Disabledbythephp. inisettingphar. readonly 1. Recently, I checked the phar module, which means that the packaging result of php is similar to that of jar in java.
But I will simply execute a line
New Phar ('My-demo. phar ');
Error:
Error message: Uncaught exception 'unexpectedvalueexception' with message 'creating archive "my-demo.phar" disabled by the php. ini setting phar. readonly' in
In the past, we had to set phar. readonly in php. ini to 0.
I just want to use
$ R = ini_set ("phar. readonly", 0 );
No, but the returned result is false.
I'm wondering. let's take a look at the php official website.
Not all valid varname options can be changed with ini_set. Here is an appendix to the list of valid options.
Oh, it turns out
Ini_set can set not all php. ini
It seems that you can only add it to php. ini.
[Phar]; http://php.net/phar.readonlyphar.readonly = Off
Problem solved