PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
How can I include_once a file which is located in the server root (/) ?
I've tried include_once('/global.php'); but I get the following error:
Warning: main(/global.php) [function.main]: failed to open stream: No such file or directory in J:\Server\htdocs\index.php on line 6
Fatal error: main() [function.require]: Failed opening required '/global.php' (include_path='.;J:\Server\xampp\php\pear'') in J:\Server\htdocs\index.php on line 6
What's wrong?
Thanks in advance.
Last edited by vigge89 on Sun Aug 29, 2004 12:03 pm, edited 1 time in total.
wwwapu wrote:You should go up-path by ../global.php or something like that
it isn't possible to load it from the root?
the problem is that im using mod_rewrite for nicer urls, which makes the number of folders from the root be uknown