FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP include()





Xcelerate
How do I make it so that instead of doing:

include(../whatever.php);

I can do:

include('full/path/to/file/whatever.php');

Thanks.
jabapyth
you cant?(just do that?)
try putting a '/' in front of the/full/path
Xcelerate
Well, that worked. Gosh I feel stupid. Three hours of work for something so simple that was already buried in the back of my mind! I was trying to do these things with computing the number of slashes in the current directory, then forming a '../' sequence to the file. Thanks, your way was much shorter.
Related topics
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.