Ask a Question related to PHP Notes, Design and Development.
-
dave@mixd.net #1
note 33976 added to function.fopen
This was a major headache for me but a very simple fix:
instead of using the actual path to your file like this:
$handle = fopen('http://www.yoursite.com/dir/file.txt', 'a')
use the directory to your file as you see in your FTP program:
$handle = fopen('/home/yoursite/www/www/dir/file.txt', 'a')
Also, make sure that exact directory has public read/write permissions enabled. I believe some other people may have tried to explain what I have said above, but to a beginner it was hard to pick up.
----
Manual Page -- [url]http://www.php.net/manual/en/function.fopen.php[/url]
Edit Note -- [url]http://master.php.net/manage/user-notes.php?action=edit+33976[/url]
Delete Note -- [url]http://master.php.net/manage/user-notes.php?action=delete+33976&report=yes[/url]
Reject Note -- [url]http://master.php.net/manage/user-notes.php?action=reject+33976&report=yes[/url]
dave@mixd.net Guest
-
note 33811 added to function.fopen
you are nothing but a fly by night piece of GARBAGE company with NO morals or STANDARDS with a FICTICIOUS removal address!! TAKE MY NAME OFF YOUR... -
note 33797 added to function.fopen
<?PHP show_source("function.fopen.php"; ?> That one is very useful. ---- Manual Page -- http://www.php.net/manual/en/function.fopen.php Edit... -
note 33763 added to function.fopen
I just want to be taken off your mailing list, thai I did not subscribe to.Please tell me how to do this. ---- Manual Page --... -
note 33652 added to function.fopen
Dear Advertiser I have atleast 50 times unsubscribed your add. But you are still continue to send your add. I once again request you to please... -
note 33611 added to function.fopen
It seems that fopen() errors when you attempt opening a url starting with HTTP:// as opposed to http:// - it is case sensitive. In 4.3.1... -
didou@php.net #2
note 33976 deleted from function.fopen by didou
Note Submitter: [email]dave@mixd.net[/email]
----
This was a major headache for me but a very simple fix:
instead of using the actual path to your file like this:
$handle = fopen('http://www.yoursite.com/dir/file.txt', 'a')
use the directory to your file as you see in your FTP program:
$handle = fopen('/home/yoursite/www/www/dir/file.txt', 'a')
Also, make sure that exact directory has public read/write permissions enabled. I believe some other people may have tried to explain what I have said above, but to a beginner it was hard to pick up.
didou@php.net Guest



Reply With Quote

