|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-08-06 12:18 UTC] rasmus
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 20:00:01 2025 UTC |
fopen wrappers can not open file on ftp site in write mode, e.g. I can not use it to _upload_ file to server. Sample code: $f=fopen("ftp://dzoni:xxx@yyy.eunet.yu/tmp/test.txt","w"); if ($f){ fputs ($f,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); fclose ($f); } else { echo "cann't upload file"; } If the file /tmp/test.txt doesn't exist I get: <b>Warning</b>: fopen("ftp://dzoni:***@yyy.eunet.yu/tmp/test.txt","w") - Not a directory in <b>test.phtml</b> on line <b>5</b><br> If the file exists and I can write to file (e.g it's mode 666), I get no warning message, but content's of file are not changed. I can read files on ftp fine, I would just like to be able to upload them this way, and in docs it is't mentioned that this can not be done. Put it on a wish list if you don't consider it a bug. Regards, Nikola Kljukovnica