|
|
| Professional PHP4 Web Development Solutions (ISBN: 1861007434) |
 |
List Price: $49.99
Our Price: $34.99
Used Price: $34.94
Release Date: November, 2002
Manufacturer: Wrox Press Inc (Paperback)
Sales Rank: 17,061
Author: Luis Argerich, Alison Gianotto, Raj Dash, Matt Anton, Jon Stephens, Bryan Waters, Jo Henrick
|
More Info
|
|
|
File Test
|
2003-02-17 00:23:19
|
| |
php
|
|
|
|
|
Category: source:php:files
|
|
Description: Get information on a file.
|
|
Platform: all
|
|
Author: detour
|
|
Viewed: 2541
|
|
Rating: 3.5/5 (4 votes)
|
|
|
| If you have any questions about
this piece of code or still need help, try posting your question on the forum. |
<?php
// filetest.php by detour@metalshell.com
//
// Get information on a file.
//
// http://www.metalshell.com/
//
$filename = "outf";
if(is_dir($filename))
echo("$filename is a directory.<br>");
else
echo("$filename is not a directory.<br>");
if(is_file($filename))
echo("$filename is a file.<br>");
else
echo("$filename is not a file<br>");
if(is_executable($filename))
echo("$filename is executable.<br>");
else
echo("$filename is not executable.<br>");
if(is_link($filename))
echo("$filename is a link.<br>");
else
echo("$filename is not a link.<br>");
if(is_readable($filename))
echo("$filename is readable.<br>");
else
echo("$filename is not readable.<br>");
if(is_writable($filename))
echo("$filename is writeable.<br>");
else
echo("$filename is not writeable.<br>");
?>
|
|
|