Ju-Pao Posted May 11, 2007 Share Posted May 11, 2007 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 ^__^ Quote Link to comment https://forums.phpfreaks.com/topic/50895-passing-parameters-on-a-file-in-a-different-directory/ Share on other sites More sharing options...
only one Posted May 11, 2007 Share Posted May 11, 2007 try putting your wariable in a session Quote Link to comment https://forums.phpfreaks.com/topic/50895-passing-parameters-on-a-file-in-a-different-directory/#findComment-250348 Share on other sites More sharing options...
Ju-Pao Posted May 11, 2007 Author Share Posted May 11, 2007 how? can you give an example? Quote Link to comment https://forums.phpfreaks.com/topic/50895-passing-parameters-on-a-file-in-a-different-directory/#findComment-250351 Share on other sites More sharing options...
only one Posted May 11, 2007 Share Posted May 11, 2007 $_SESSION[variable]=$variable; Quote Link to comment https://forums.phpfreaks.com/topic/50895-passing-parameters-on-a-file-in-a-different-directory/#findComment-250352 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.