forcer Posted July 15, 2008 Share Posted July 15, 2008 i keep getting this error: Warning: main(../../forums/global.php) [function.main]: failed to open stream: No such file or directory in /home/forcer/public_html/news/admin/add.php on line 5 Fatal error: main() [function.require]: Failed opening required '../../forums/global.php' (include_path='/usr/lib/php:.:/usr/php4/lib/php:/usr/local/php4/lib/php') in /home/forcer/public_html/news/admin/add.php on line 5 however the file does exist... here is the code used //get forum globals $curdir = getcwd (); chdir('../../forums/'); require_once('../../forums/global.php'); chdir ($curdir); any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/114816-solved-file-does-not-exist-error-but-it-does/ Share on other sites More sharing options...
MadTechie Posted July 15, 2008 Share Posted July 15, 2008 //get forum globals $curdir = getcwd (); //shouldn't it be chdir('../../forums/'); require_once('global.php'); //OR require_once('../../forums/global.php'); //but not both ? chdir ($curdir); Quote Link to comment https://forums.phpfreaks.com/topic/114816-solved-file-does-not-exist-error-but-it-does/#findComment-590373 Share on other sites More sharing options...
forcer Posted July 15, 2008 Author Share Posted July 15, 2008 oh yeah thanks, its fixed Quote Link to comment https://forums.phpfreaks.com/topic/114816-solved-file-does-not-exist-error-but-it-does/#findComment-590437 Share on other sites More sharing options...
MadTechie Posted July 15, 2008 Share Posted July 15, 2008 Cool, can you click solved please Quote Link to comment https://forums.phpfreaks.com/topic/114816-solved-file-does-not-exist-error-but-it-does/#findComment-590438 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.