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? 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); 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 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 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
Archived
This topic is now archived and is closed to further replies.