I have a coding question.
i was reviewing php.net's documentation on the ftp_get() function but it lacked some understanding as to the syntax of the local and remote files
which leads me to the following questions
i have in my code
------code-------
$download = ftp_get($serv, "C:\Windows\Desktop\$file","$DOCUMENT_ROOT/$file",FTP_BINARY);
----end---------
is this the syntax for the local and remote file path? (the files to be downloaded are in a separate folder to the programme)
if the syntax above is incorrect who does PHP know where i want my file saved to on the local disk?
if the local file does not exists will it create it as like fwrite() would?
when you say that ASCII mode is for text files. Do you mean ".txt" or do you mean text based doucments i.e. word, excel, pdf's?
i get a Warning ftp_get: no such file or directory, yet i specified an absolute path to the file why would i get this error? (chmod is set to 777)
FTP issue
Moderator: General Moderators
- kendall
- Forum Regular
- Posts: 852
- Joined: Tue Jul 30, 2002 10:21 am
- Location: Trinidad, West Indies
- Contact:
FTP error
Hi,
i have a question
isnt the ftp_get($serv,"local file","remote file",FTP_ASCII);
suppose to download the remote file to your harddrive on your PC like a normal FTP programm would?
is used this and all it did was create a copy right back on the local server
i even specified a "C:\Windows\Desktop\$localfile" and it created a copy right back on the server
i cant even delete the file
what is this function used for and what is the proper syntax path to use?
is it relative or absolute?
Kendall
P.S. HEEEEEEEEELLLLLLLLLLPPPPPPPPPPPPPPP
i have a question
isnt the ftp_get($serv,"local file","remote file",FTP_ASCII);
suppose to download the remote file to your harddrive on your PC like a normal FTP programm would?
is used this and all it did was create a copy right back on the local server
i even specified a "C:\Windows\Desktop\$localfile" and it created a copy right back on the server
i cant even delete the file
what is this function used for and what is the proper syntax path to use?
is it relative or absolute?
Kendall
P.S. HEEEEEEEEELLLLLLLLLLPPPPPPPPPPPPPPP
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact: