Home Tutorial Php Phpfiles The file_exists() function, file_exists php, file_exists in php

 
 

Share on Google+Share on Google+
The file_exists() function, file_exists php, file_exists in php
Posted on: September 22, 2009 at 12:00 AM
Advertisement
This example of file_exists() function in PHP that checks the existence of a file or directory.

The file_exists() function returns TRUE if the file or directory specified by filename exists; FALSE otherwise. 

Syntax of file_exists() Function PHP

bool file_exists (file_name )

It test the existence of the file or the directory given as argument name

It return true if the file or the directory given is existing 

If Not existing then it returns FALSE

Code for file_exists() Function PHP 

<?php

echo "file is existing ".file_exists("c:/rose1/ram.txt");

echo "<br>file is existing ".file_exists("c:/rose1/ram1.txt");

?>

 

 

Advertisement

Related Tags for The file_exists() function, file_exists php, file_exists in php:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 22, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com