M.O.S. Studios Posted January 6, 2009 Share Posted January 6, 2009 hey guys i need to incude something in a lower directory this is what i typed include("../1.php"); it gave me this error Warning: include(../1.php) [function.include]: failed to open stream: No such file or directory in /home/montrea1/public_html/demo/admin/content/catagory/add.php on line 26 Warning: include() [function.include]: Failed opening '../1.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/montrea1/public_html/demo/admin/content/catagory/add.php on line 26 any ideas? thanks in advance Link to comment https://forums.phpfreaks.com/topic/139611-solved-include-not-working/ Share on other sites More sharing options...
premiso Posted January 6, 2009 Share Posted January 6, 2009 I recall a similar problem and it was naming it x.php try changing it to a1.php or something like that and see if it works. Link to comment https://forums.phpfreaks.com/topic/139611-solved-include-not-working/#findComment-730402 Share on other sites More sharing options...
redarrow Posted January 6, 2009 Share Posted January 6, 2009 This should diffidently work. <?php $wd_was = getcwd(); chdir('folder_name/'); include('file_name.php'); chdir($wd_was); ?> Link to comment https://forums.phpfreaks.com/topic/139611-solved-include-not-working/#findComment-730430 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.