Page 1 of 1
copy file to local hard drive
Posted: Mon Mar 01, 2004 9:44 pm
by tstimple
Is it possible (using file and/or FTP functions) to copy a file to my local c:drive?
--Tim
Posted: Mon Mar 01, 2004 9:47 pm
by redhair
yes
Posted: Mon Mar 01, 2004 9:49 pm
by tstimple
Thanks for explaining that so clearly!
Do you think you could provide an example?
Whenever I try to use the copy or fwrite functions I get a permissions error.
How do I overcome this?
I have used FTP to copy the file to my web server (where I can set a username & password). I now need to copy the file to my local hard drive. (I would rather write it directly to my local c: drive using an ftp fuction, but I seem to have the same permission denied error.
--Tim
Posted: Mon Mar 01, 2004 10:06 pm
by Illusionist
why not jsut copy it straight off the server and not use code? Surely the server has a file manager??
Posted: Mon Mar 01, 2004 10:08 pm
by tim
why not save some time and just download a Ftp program? makes life much eaiser.
Posted: Mon Mar 01, 2004 10:13 pm
by tstimple
I do have an FTP program.
I am trying to automate a process that has to happen everyday. This includes
1. downloading from ftp
2. Unzipping the downloaded file
3. Reading the extracted file into a table
4. mainipulate that table
5. Uploading the table to mysql
so far, i do this all manually
--Tim
Posted: Mon Mar 01, 2004 10:17 pm
by andre_c
If possible, i would recommend doing all of the work in the server. Especially since the file is already there and you can use php and send the table to the mysql server straight from there.
Posted: Mon Mar 01, 2004 10:20 pm
by tstimple
That is what I have been working on. The problem is that I have not found a php method to extract a passworded zip file.
Any ideas?
--Tim
Posted: Mon Mar 01, 2004 10:30 pm
by andre_c
what operating system is the server running on?
Posted: Mon Mar 01, 2004 10:47 pm
by tstimple
unix/apache