marcus Posted November 2, 2006 Share Posted November 2, 2006 Ok, what I'm trying to do is, if the file does not exist it will echo off like This file does not exist, or whatever.Here is my code:[code]<?php $page = $_GET[page]; $ref1 = $_GET[ref]; $ref = $_SERVER[REQUEST_URI]; include('refs.php'); if($page == false){ //$number = "7"; include('news/show_news.php'); }else //if(!file_exists($page)){ //echo "This page does not exist, sorry :("; //}else if($page == $page){ include("inc/$page.inc"); }; ?>[/code]But each time I use that, I go to a page does exist it says it doesn't (when uncommented). How can I fix this? Quote Link to comment Share on other sites More sharing options...
gluck Posted November 3, 2006 Share Posted November 3, 2006 print the page path and see what it has Quote Link to comment Share on other sites More sharing options...
marcus Posted November 3, 2006 Author Share Posted November 3, 2006 It says...Why would I need to print it?I mean it's finding it inc/$page.inc Quote Link to comment Share on other sites More sharing options...
trq Posted November 3, 2006 Share Posted November 3, 2006 So you have a page called inc/$page.inc then? Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted November 3, 2006 Share Posted November 3, 2006 how are you typing it in the address bar? 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.