Problem with Dir reading....
Posted: Fri Jun 14, 2002 7:31 pm
this script works fine, no problems with it at all
it does't read "Update.txt" cos of
i have other files that i don't want it to read, is there any way i can stop it from reading files with .inc as ext?
that way i don't have to add more files every time i update.
thanks in adv
Code: Select all
<?
$root = "DIR";
if ($handle = opendir($root)) {
while($file = readdir($handle)) {
if ($file != "." && $file != ".." && $file != "this.txt") {
$file2 = substr("$file", 0, -4);
etc etc etc
balh balh balh
}
?>it does't read "Update.txt" cos of
Code: Select all
if ($file != "." && $file != ".." && $file != "this.txt") {that way i don't have to add more files every time i update.
thanks in adv