It's because you have assigned expression to variable declaration. It can only use constants.
The workaround would be like this
class MyClass {
...
public static $MyString;
...
}
MyClass::$MyString = file_get_contents('file.txt');
It's because you have assigned expression to variable declaration. It can only use constants.
The workaround would be like this
class MyClass {
...
public static $MyString;
...
}
MyClass::$MyString = file_get_contents('file.txt');
I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...
No comments:
Post a Comment