Maarten Balliauw {blog}

ASP.NET, ASP.NET MVC, Windows Azure, PHP, ...

NAVIGATION - SEARCH

PHP zip:// and parse_url...

After having a few months of problems using PHP and fopen('zip://something.xlsx#xl/worksheets/sheet1.xml', 'r'), I finally found the reason of that exact line of code giving errors on some PC's... Assuming this uses a call to parse_url under the hood, I tried parsing this, resulting in the following URL parts:

Array
(
   [scheme] => zip
   [host] => something.xlsx#xl
   [path] => /worksheets/sheet1.xml
)

That's just not correct... Parsing should return the following:

Conclusion: beware when using parse_url and the zip file wrapper!

blog comments powered by Disqus