note 105465 deleted from function.fopen by cmb

From: Date: Fri, 09 Sep 2016 22:33:56 +0000
Subject: note 105465 deleted from function.fopen by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-206550@lists.php.net to get a copy of this message
Note Submitter: merye at web-graphique dot com ---- I had to switch from relative paths to full paths when my web host recently migrated the server onto their hosting cloud. This used to work for me: <?php $fplog = fopen('ipn.log','a'); ?> After the migration, however, I received the following error message: Warning: fopen(ipn.log) [function.fopen]: failed to open stream: Permission denied in D:\home\server_name\log_test.php on line 21 I had to change the code to the following to get it to work: <?php $logfile = $_SERVER['DOCUMENT_ROOT'].'\\ipn.log'; $fplog = fopen($logfile,'a'); ?>

« previous php.notes (#206550) next »