Please Help.
I can't seem to write to a file when a URL precedes the file name (see below).
If I remove the URL (i.e., so it just uses "testfile.txt") it works fine.
I have the following parameter set in the php.ini file:
allow_url_fopen = On
$FN = "http://www.myhost.com/testfile.txt";
if (!($fout=fopen($FN,"w"))) die ("Cannot create output file.");
fopen failure
Moderator: General Moderators
-
WebbieDave
- Forum Contributor
- Posts: 213
- Joined: Sun Jul 15, 2007 7:07 am
Re: fopen failure
You won't be able to write to a file through http but it is possible through ftp. From the manual:
Code: Select all
$handle = fopen("ftp://user:password@example.com/somefile.txt", "w");