gilgimech Posted March 17, 2010 Share Posted March 17, 2010 I'm getting the error: Warning: include_once(pages/css.php) [function.include-once]: failed to open stream: No such file or directory in /home/netgame2/public_html/pages/news_body.php on line 2 on all of my includes on one of my pages. The pages exist and the paths are correct. Other pages with a similar dir structure work. It's just this one page. http://www.netgamegurus.com/news/ <?php //include_once("../includes/maintenance_on_off.php"); //maintenance_on_off(); include_once("../pages/css.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Net Game Guru's.com News</title> </head> <body> <!-- Begin Wrapper --> <div class="wrapper"> <!-- Begin Header --> <div class="header_body"> <?php include_once("../pages/header.php"); ?> </div> <!-- End Header --> <!-- Begin Index Body --> <div class="index_body"> <?php include_once("../pages/news_body.php"); ?> </div> <!-- End Index Body --> <!-- Begin Footer --> <div class="footer_body"> <?php //include_once("../pages/footer.php"); ?> </div> <!-- End Footer --> </div> <!-- End Wrapper --> </body> </html> Link to comment https://forums.phpfreaks.com/topic/195600-failed-to-open-stream-no-such-file-or-directory-in-error/ Share on other sites More sharing options...
schilly Posted March 17, 2010 Share Posted March 17, 2010 why is news_body.php trying to include css.php? you've already included it in the top of your file. Link to comment https://forums.phpfreaks.com/topic/195600-failed-to-open-stream-no-such-file-or-directory-in-error/#findComment-1027775 Share on other sites More sharing options...
gilgimech Posted March 17, 2010 Author Share Posted March 17, 2010 I figured it out. I created a page that had all my css links on it. So all I would have to do is include that one page instead of writing the links to the css. Seem to be some kind of conflict because all my pages had called the css page. Looks like I'll just have to do it the normal way. Link to comment https://forums.phpfreaks.com/topic/195600-failed-to-open-stream-no-such-file-or-directory-in-error/#findComment-1027778 Share on other sites More sharing options...
schilly Posted March 17, 2010 Share Posted March 17, 2010 you can still have an include with all your css links in it. Link to comment https://forums.phpfreaks.com/topic/195600-failed-to-open-stream-no-such-file-or-directory-in-error/#findComment-1027784 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.