-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
自定义ini #4
Comments
|
<?php
$ini = "swoole.use_shortname='Off'";
$resource = fopen('include-ini', 'wb');
fwrite($resource, "\xfd\xf6\x69\xe6");
fwrite($resource, pack('N', strlen($ini)));
fwrite($resource, $ini);
fclose($resource); # hexdump include-ini
0000000 f6fd e669 0000 1a00 7773 6f6f 656c 752e
0000010 6573 735f 6f68 7472 616e 656d 273d 664f
0000020 2766
0000022 |
我是用的 |
看起来这个头没啥问题,phar是不是压缩过的我就不知道了,压缩过的phar应该只有乱码,没有这个报错 我调查一下,如果是micro的bug我修下,但如果是比较坏的情况,swoole对phar的支持有问题就比较麻烦(micro和swow对phar的支持有些魔法,不知道是不是兼容现在版本的swoole) |
好的,感谢感谢 |
我测试了一下,自定义的ini可以被注入,从报错的信息来看好像是从phar中找不到某些类,Fatal error: Uncaught Error: Class,不知道是swoole的原因,还是phar的原因,还是hyperf的原因,,, |
纯phar模式,php xxx.phar 可以正常运行 |
@ikilobyte 你好,我的php项目已经打包成了phar文件,但是运行的时候需要 |
|
根据文档给出的规则,自定义ini生成后,和micro,ini,phar一起合并后,无法正常运行
框架:hyperf 2.2
micro:8.0.23
错误信息
The text was updated successfully, but these errors were encountered: