RE: [PHP] Check for Page
| From: | Robert Collins | Date: | Fri, 26 Jan 2001 21:01:57 +0000 |
| Subject: | RE: [PHP] Check for Page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-36869@lists.php.net to get a copy of this message | ||
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:karlflips@kstub.com]
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: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net