|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-08-29 20:00 UTC] bjori@php.net
[2011-08-29 20:00 UTC] bjori@php.net
-Status: Open
+Status: Feedback
[2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 18:00:01 2025 UTC |
Description: ------------ If you have a .phar in a directory that contains spaces (e.g. "/some/path with spaces/example.phar") it is not possible to read files in that phar using their full and escaped path (e.g. "phar:///some/path%20with%20spaces/example.phar/README"). This got to my attention since simplexml_load_file always escapes the provided paths. Test script: --------------- <?php $readme = file_get_contents('phar:///some/path%20with%20spaces/example.phar/README'); Expected result: ---------------- $readme contains data from "phar:///some/path with spaces/example.phar/README" Actual result: -------------- PHP Warning: file_get_contents(phar:///some/path%20with%20spaces/example.phar/README): failed to open stream: phar error: invalid url or non-existent phar "phar:///some/path%20with%20spaces/example.phar/README" in *** on line 2