Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

validate file exist php

Input : echo file_exists('/user01/work/gfg.txt');
Output : 1

Input : $file_pointer = '/user01/work/gfg.txt';
        if (file_exists($file_pointer)) {
            echo "The file $file_pointer exists";
        }else {
            echo "The file $file_pointer does 
                                   not exists";
        }
Output : 1
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #validate #file #exist #php
ADD COMMENT
Topic
Name
4+7 =