[Plugin: HTML Import 2] Fopen mode not specified
-
I’m surprised this hasn’t come up anywhere else. Why does the code for reading in the contents not specify a mode for the fopen() function?
I googled for a while and I couldn’t find if there’s a standard setting for php that makes it so that you don’t have to specify the mode and when you just give the path then it defaults to read.
In other words – I don’t understand why no one else has problems with this line of code: $contents = fopen($path)
According to the php documentation the mode parameter is required. So it should be $contents = fopen($path, “rb”) or something like that. But then when specifying a mode, a reference to the resource is returned which is numeric. This causes problems later in the code when a string value is expected.
Do you know what I’m talking about Stephanie?
Any insights are very appreciated.
- The topic ‘[Plugin: HTML Import 2] Fopen mode not specified’ is closed to new replies.