Please support our PHP advertiser: Lunarpages PHP Web Hosting
![]() |
•
•
Join Date: Apr 2008
Location: Lahore, Pakistan
Posts: 44
Reputation:
Rep Power: 1
Solved Threads: 1
hey guys apparently directory functions such as opendir, and scandir are not working on my host.
following is the code, its from php.net.
the output is keep on coming fail.
is there something wrong with my php settings or something else.
the page is,
http://worldofpakistan.net/try/write.php
following is the code, its from php.net.
the output is keep on coming fail.
is there something wrong with my php settings or something else.
the page is,
http://worldofpakistan.net/try/write.php
php Syntax (Toggle Plain Text)
<?php $dir = "http://www.worldofpakistan.net/"; $dh = scandir($dir); if($dh) { echo "success"; } else { echo "fail"; } while (false !== ($filename = readdir($dh))) { $files[] = $filename; } sort($files); print_r($files); rsort($files); print_r($files); ?>
Last edited by mustafaneguib : Jul 20th, 2008 at 8:40 pm.
•
•
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 850
Reputation:
Rep Power: 2
Solved Threads: 66
replace 'echo "fail";'
with print_r(error_get_last());
with print_r(error_get_last());
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
•
•
Join Date: Apr 2008
Location: Lahore, Pakistan
Posts: 44
Reputation:
Rep Power: 1
Solved Threads: 1
•
•
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 850
Reputation:
Rep Power: 2
Solved Threads: 66
I've never seen that error and there's not much documentation on it so I would assume that it is a problem at the server level.
Last edited by R0bb0b : Jul 21st, 2008 at 1:58 am.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
![]() |
Similar Threads
Other Threads in the PHP Forum
- How to get the current working directory (C++)
- 'Private' directory practical use (PHP)
- sdl_ttf not working (C++)
- Evolution from 3G to 4G and beyond (5G) (Computer Science)
- Matlab Help Browser (Computer Science)
- RedHat Network Server (*nix Hardware Configuration)
- window () is not working at all (C++)
- Apache Alias Directive... mod_alias question (Linux Servers and Apache)
Other Threads in the PHP Forum
- Previous Thread: Multidimensional array problem
- Next Thread: PH code not working! :O(
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode