web 2.0

How to use PHP & Check File Exists in Folder

How to use PHP & Check File Exists in Folder Learn how to use the PHP to Check File Exists in Folder

ShotDev Focus:
- PHP & Check File Exists in Folder

Example

php_file_exists.php

  1. <html>  
  2. <head>  
  3. <title>ShotDev.Com Tutorial</title>  
  4. </head>  
  5. <body>  
  6. <?php  
  7. if(file_exists("shotdev/my.txt"))  
  8. {  
  9. echo "Files shotdev/my.txt exists.";  
  10. }  
  11. else  
  12. {  
  13. echo "No file.";  
  14. }  
  15. ?>  
  16. </body>  
  17. </html>  

Create a php file and save to path root-path/myphp/

Run
http://localhost/myphp/php_file_exists.php

Screenshot

PHP Check File Exists in Folder
.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.