Skip to content
Go back

PHP zip:// and parse_url...

Edit page

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!


Edit page
Share this post on:

Previous Post
Open XML Developer workshop content
Next Post
My job?