How do I tell a script to die if no file is found, where the file is defined as $page.
vevs
8:33 pm on Feb 7, 2006 (gmt 0)
something like this should do it if (is_file('path_to_file_and_file_name')) {
} else { die("no such file"); };
sssweb
10:22 pm on Feb 7, 2006 (gmt 0)
Thanks, that worked. I added a command to send an email to the site admin before it dies; I want to include the page with the bad link - what would be the $string for the current page?
vevs
10:38 pm on Feb 7, 2006 (gmt 0)
try this $_SERVER['REQUEST_URI'];
sssweb
10:49 pm on Feb 7, 2006 (gmt 0)
I got a parse error; the context I'm using it in is this: