HELP! I need to list files but not folders!
Posted: Tue May 21, 2002 3:28 pm
Hey, I have a page that lists all the stuff in a DIR, but that includes folders. Anybody know a way for me to have it show only files?
Thanks?
Thanks?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
if(is_file($name))
print($name);
?>Code: Select all
<?php
if(is_file($name))
print($name);
?>Code: Select all
<?php
if(is_file($name))
print($name);
?>Code: Select all
<?php
if(is_file($name))
print($name);
?>Code: Select all
<?php
if(is_file($name))
print($name);
?>Code: Select all
<?php
if(is_file($name))
print($name);
?>Code: Select all
<?php
if(is_file($name))
print($name);
?>Code: Select all
<?
$root = "/";
if ($handle = opendir($root)) {
while($file = readdir($handle)) {
if ($file == їa-zA-Z0-p_-]*.php) {
$create = filemtime($file);
$create_2 = date("m/d/Y h:i:s", $create);
echo "what you want to echo";
}
}
closedir($handle);
}
?>