Hey,
I have a script that includes a file, the name depending on a variable in the URL. Example:
Note: For this example, pretend the script is called by this URL:
http://www.mywebsite.com/includer.php?page=main
And here's the script:
if ($page) {
include("http://www.mywebsite.com/include/"."$page".".inc");
} else {
echo "A page name was not supplied.";
}
Now, assuming that the page exists, the script works and the page is included. However, if a page supplied does not exist, a warning is displayed in its place. I would like to know if there's a way to have some sort of statement like:
if (thepagedoesnotexist) {
echo "The supplied page does not exist.";
}
Of course, it won't work as typed, but I'm hoping someone knows a way to get this kind of effect. Thanks!
GR