note 51855 added to function.stream-wrapper-register
| From: | cellog@php.net | Date: | Wed, 13 Apr 2005 02:45:07 +0000 |
| Subject: | note 51855 added to function.stream-wrapper-register | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-87925@lists.php.net to get a copy of this message | ||
If you plan to use your wrapper in a require_once you need to define stream_stat(). If you plan to
allow any other tests like is_file()/is_dir(), you have to define url_stat().
stream_stat() must define the size of the file, or it will never be included. url_stat() must
define mode, or is_file()/is_dir()/is_executable(), and any of those functions affected by
clearstatcache() simply won't work.
It's not documented, but directories must be a mode like 040777 (octal), and files a mode like
0100666. If you wish the file to be executable, use 7s instead of 6s. The last 3 digits are
exactly the same thing as what you pass to chmod. 040000 defines a directory, and 0100000 defines a
file. It would be really helpful to add this to the official manual!
----
Manual Page -- http://www.php.net/manual/en/function.stream-wrapper-register.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51855
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51855&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51855&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51855&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51855&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51855&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51855&report=yes
Search -- http://master.php.net/manage/user-notes.php