note 127040 added to function.file-put-contents

From: Date: Sun, 08 May 2022 07:34:32 +0000
Subject: note 127040 added to function.file-put-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-218363@lists.php.net to get a copy of this message
A more simplified version of the method that creates subdirectories: function path_put_contents($filePath, $contents, $flags = 0) { if (! is_dir($dir = implode('/', explode('/', $filePath, -1)))) mkdir($dir, 0777, true); file_put_contents($filePath, $contents, $flags); } ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.47 (proxied: 95.160.38.59) ---- Manual Page -- https://php.net/manual/en/function.file-put-contents.php Edit -- https://main.php.net/note/edit/127040 Del: integrated -- https://main.php.net/note/delete/127040/integrated Del: useless -- https://main.php.net/note/delete/127040/useless Del: bad code -- https://main.php.net/note/delete/127040/bad+code Del: spam -- https://main.php.net/note/delete/127040/spam Del: non-english -- https://main.php.net/note/delete/127040/non-english Del: in docs -- https://main.php.net/note/delete/127040/in+docs Del: other reasons-- https://main.php.net/note/delete/127040 Reject -- https://main.php.net/note/reject/127040 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#218363) next »