tarun Posted June 24, 2007 Share Posted June 24, 2007 $id = $_GET["id"]; if (!($fp=@fopen("page.php?id=$id", "r"))) die ("Page Does Not Exist"); This Code Peice Of Code Does Not Work I Always Get Page Does Not Exist... I Think I Know Why But Hard To Explain Any Ideas In How To Get Around It....? THnx, Tarun Link to comment https://forums.phpfreaks.com/topic/56951-solved-help-with-fopen-fopenpagephpidid/ Share on other sites More sharing options...
Wildbug Posted June 24, 2007 Share Posted June 24, 2007 Have you tried removing the "@" while debugging it? Since you're trying to use the HTTP wrapper, use "http://www.yoursite.com/page.php?id=$id", otherwise PHP will be checking the filesystem for it. Link to comment https://forums.phpfreaks.com/topic/56951-solved-help-with-fopen-fopenpagephpidid/#findComment-281311 Share on other sites More sharing options...
tarun Posted June 24, 2007 Author Share Posted June 24, 2007 Okay But Now I Get This Error... Warning: fopen(page.php?id=00001): failed to open stream: No such file or directory in /home/www/**********/index.php on line 3 Link to comment https://forums.phpfreaks.com/topic/56951-solved-help-with-fopen-fopenpagephpidid/#findComment-281317 Share on other sites More sharing options...
Wildbug Posted June 24, 2007 Share Posted June 24, 2007 Right, so did you try the http:// portion? Link to comment https://forums.phpfreaks.com/topic/56951-solved-help-with-fopen-fopenpagephpidid/#findComment-281323 Share on other sites More sharing options...
tarun Posted June 24, 2007 Author Share Posted June 24, 2007 Yes Same Error... Link to comment https://forums.phpfreaks.com/topic/56951-solved-help-with-fopen-fopenpagephpidid/#findComment-281324 Share on other sites More sharing options...
chigley Posted June 24, 2007 Share Posted June 24, 2007 Use file_get_contents() Much simpler... Link to comment https://forums.phpfreaks.com/topic/56951-solved-help-with-fopen-fopenpagephpidid/#findComment-281326 Share on other sites More sharing options...
tarun Posted June 24, 2007 Author Share Posted June 24, 2007 Okay lol Thnx Anyway Link to comment https://forums.phpfreaks.com/topic/56951-solved-help-with-fopen-fopenpagephpidid/#findComment-281327 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.