Try this:

<?
$filename = "dat.txt";

if (file_exists($filename)){
        echo "file exists";
} else {
        echo "file does not exist";
}
?>

Robert W. Collins
Web Developer II
Insight / TC Computers
www.insight.com
www.tccomputers.com

-----Original Message-----
From: Karl J. Stubsjoen [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 1:58 PM
To: PHP Mailing List
Subject: [PHP] Check for Page


How could I:

How could I check to make sure a page exists before I redirect to it (a page
within my own server, but page name passed in querystring - therefore it
could be changed by client)?

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to