faqts : Computers : Programming : Languages : PHP : Function Libraries : PHP Related

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

0 of 7 people (0%) answered Yes
Recently 0 of 7 people (0%) answered Yes

Entry

fopen is not returning an integer but instead "Resource id #10", ftp_fput then rejects it! Any ideas

Oct 9th, 2006 09:51
Matthew Wilkinson, Stewart Pogson, http://php.net/fopen


fopen returns a resource that points to a file. To retrieve contents
from a file, you must use fread or a similar function. ftp_fput is
completely separate to the fopen family, and requires a resource from
the ftp family of functions. To write to an opened fopen resource, you
must use fputs or fwrite.