Page 1 of 1

passing parameters on a file in a different directory

Posted: Fri May 11, 2007 12:09 am
by Ju-Pao
How can i pass a parameter to a function in a class from a different directory?

For example i have mycode.php in the /php/path/ directory.

I want to pass my $var variable to getdata.class into the function recievevar() in the /class/path/ directory.

Thank you for your notice

^__^

Posted: Fri May 11, 2007 12:27 am
by Christopher
The directory the file is in does not matter. You need to include both the mycode.php and getdata.class files, and create a getdata object. Then you can pass parameters to functions or object methods.

Posted: Fri May 11, 2007 1:02 am
by Ju-Pao
how can i create an object? are there any tutorials that you can suggest?

Posted: Fri May 11, 2007 1:18 am
by Christopher