|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Enthusiast
![]() Join Date: Apr 2003
Location: New York
Posts: 86
|
Opening an anon ftp directory using readdir()
I just moved all my downloads from http to ftp and I was having some trouble modifying my scripts..
What I had before was: PHP Code:
but now its ftp so I have to change the dir. Web location: ftp://pregaming.com/pub/.... Server location: /anon_ftp/pub... I tried both PHP Code:
PHP Code:
(got the error: Code:
Warning: OpenDir: No such file or directory (errno 2) Warning: readdir(): supplied argument is not a valid Directory resource Any ideas? Thanks ![]() |
|
|
|
|
|
#4 |
|
********* Wizard
![]() Join Date: Aug 2002
Location: Burpengary, Australia
Posts: 4,601
|
No, because FTP is it's own protocol, readdir() only works on the local filesystem.
|
|
|
|
|
|
#5 |
|
sitepoint wombat
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2000
Location: Perth Australia
Posts: 1,722
|
if fopen wrappers are enabled then eg readfile('ftp://user
assword@yourdomain.com/') should work ? |
|
|
|
|
|
#6 |
|
********* Wizard
![]() Join Date: Aug 2002
Location: Burpengary, Australia
Posts: 4,601
|
Well, that's too advanced for me
![]() |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 13:13.








assword@yourdomain.com/') should work ?



Linear Mode
