|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-22 14:37 UTC] tony2001@php.net
[2004-10-30 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 12:00:01 2025 UTC |
Description: ------------ The file_put_contents function doesn't return anything on an error, it would be better if for example: on a permission error, I could catch an error instead of a big message and no result Reproduce code: --------------- if(file_put_contents("./file", " ") === FALSE) { exit("error, could not write to file"); } else { echo "Yay, file is completed"; } Expected result: ---------------- error, could not write to file Actual result: -------------- Warning: file_put_contents(./file) [function.file-put-contents]: failed to open stream: Permission denied in /var//www/test.php on line 2