PHPEveryday.com
PHP and Web Development Tutorial
What are you looking for?
PHP - XML: Read from a File »
PHP File: Checking File or Directory
PHP File Tips - Part 4: This is common function when you involve file. We must check whether the file is exist or not. See following code:
<? $file = "test.txt"; if(!file_exists($file)){ die('cannot find file'); } echo "file exist"; ?>
Series this article:
PHP File: 3 Way of Reading File
PHP File: Reading File at Particular Lines
PHP File: Reading File at Particular Byte Ranges
PHP File: Checking File or Directory
PHP File: Showing All File in A Directory
PHP File: Showing All Files and Folders in Particular Directory
PHP File: Retrieving File Statistic
PHP File: Retrieving More File Information
PHP File: Counting Lines in a File
PHP File: Counting Characters and Words in File
PHP File: Writing File
PHP File: Locking and Unlocking File
PHP File: Removing Lines From File
PHP File: Inserting Lines into a File
Tag:
file
,
check file
,
directory
Category:
PHP Basic
Post : April 13th 2008 Read: 2,261
View the discussion thread.
blog comments powered by
Disqus
Database Tutorial
Learn PHP MySQL
Learn PHP ADOdb
Learn PHP Data Object/PDO
Learn PHP XML
Learn PHP SimpleXML
Security Tutorial
Learn PHP Security
Learn HTTP Authentication
Learn PHPSecureSite
Framework Tutorial
Learn CodeIgniter
Learn Joomla
Learn Smarty
Learn Zend Framework
Template Tutorial
Learn Joomla Template
Learn WordPress Template
API Tutorial
Learn Facebook
JS Framework Tutorial
Learn MooTools
Learn JQuery
AJAX Tutorial
Learn AJAX in 10 Minutes
Learn AJAX Client Side
Learn AJAX PHP
Learn AJAX Remote Server
Learn AJAX Repetitive
Learn AJAX MySQL
Learn AJAX Grid
Web Services Tutorial
Learn Web Services NuSOAP
Learn Web Services WSDL
Learn Web Services WSDL Array
Learn Web Services .NET Grid
Learn Web Services WDDX
Package Post
Joomla Intro
Joomla Component
Joomla Module
Joomla MVC
Joomla MVC Backend
PostNuke Intro
Zend Framework Intro
Zend Framework Action
Zend Framework Database
Zend Framework Registry
Zend Framework Config
Zend Framework Login
Zend Framework Session
PHP Array Tips
PHP File Tips
PHP Email
PHP Ms Excel
PHP Pattern
PHP SMS
Flash Database
PHP Multitier
jQuery Introduction
jQuery Selectors
Portable Web Server
Web Mobile Intro
Drupal Installation
Drupal Configuration