|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-11-08 02:22 UTC] aharvey@php.net
-Status: Open
+Status: Wont fix
[2012-11-08 02:22 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 11:00:02 2025 UTC |
Description: ------------ Currently, fopen allows you to create new files, but not in directories that don't exist - for example, if you want to write to /tmp/logs/something.log, you have to check that /tmp/logs exists every time, before running your fopen. It would be convenient if you could pass a flag to fopen to tell it to recursively create any missing directories in the path, in order to open the file. Test script: --------------- fopen('/tmp/logs/test.log', 'w'); // fails if logs doesn't exist mkdir('/tmp/logs'); fopen('/tmp/logs/test.log', 'w'); // fails if logs does exist