Search results for 'file_exists'. 1 post(s) found.
- 2007/10/16 How to check if a file exists ?
To determine whether a file exists on the server, PHP has a simple function: file_exists.
<?php
$filename = '/optional/path/file.txt';
if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
?>
$filename = '/optional/path/file.txt';
if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
?>
Another posts included in "PHP"
| How to force cookies, disable php sessid in URL ? (0) | 2007/10/16 |
| How to make random number ? (0) | 2007/10/16 |
| form action - detect form post (0) | 2007/10/16 |
| How to include a file with error reporting ? (0) | 2007/10/16 |
| PHP if...else... example (0) | 2007/10/16 |
| PHP form handling example in single page (0) | 2007/10/16 |
| How to get reffering URL ? (0) | 2007/10/16 |
| How to convert formatted date time string to datetime? (0) | 2007/10/12 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 04:49
moneyideas
-
Subject different money making ideas
2010/01/29 13:40
moneyideas
-
Subject different money making ideas
2010/01/31 16:42
moneyideas

Prev

Rss Feed