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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
tarun Posted June 24, 2007 Author Share Posted June 24, 2007 Yes Same Error... Quote Link to comment Share on other sites More sharing options...
chigley Posted June 24, 2007 Share Posted June 24, 2007 Use file_get_contents() Much simpler... Quote Link to comment Share on other sites More sharing options...
tarun Posted June 24, 2007 Author Share Posted June 24, 2007 Okay lol Thnx Anyway Quote Link to comment 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.