note 107221 modified in function.file-put-contents by danbrown

From: Date: Thu, 10 May 2012 21:37:24 +0000
Subject: note 107221 modified in function.file-put-contents by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187915@lists.php.net to get a copy of this message
file_put_contents does not issue an error message if file name is incorrect(for example has improper symbols on the end of it /n,/t)
that is why use trim() for file name.
$name=trim($name);
file_put_contents($name,$content); --was-- file_putt_contents does not issue an error message if file name is incorrect(for example has improper symbols on the end of it /n,/t) that is why use trim() for file name. $name=trim($name); file_put_contents($name,$content); http://php.net/manual/en/function.file-put-contents.php

« previous php.notes (#187915) next »