PHP help
- Started
- Last post
- 27 Responses
- UndoUndo0
haha , sorry fifty50...glad you got it sorted
- determinedmoth0
dont be like that. It was kinda on topic!
- fifty500
I have no clue what you guys are going on about -_-
- foreign0
try using require/require_once.
http://www.php.net/require
- UndoUndo0
once a file has been included the code in the included file is just like hving it in the original file, scope is also the same. you don't need to pass variables to it. if you have a function inside the included file and you want to pass a var to it. do it with myfunction($var); and have it return something
just make sure you call the function after the file has been included!
- pkmlta0
is there a reason you are passing a variable if you plan to include this script in another? once included it should have access to any variables with in the container script.
- cosmo0
u can't pass variable in that manner. variables should be accessible to others automatically.
$blog = 1
include ("watever.php");