-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
yaf 3.2.5 CLI 模式运行参数接收不到呢? #506
Comments
3.1.1版本可以正确实例化路由,最新版本不能正确实例化内容 是不是bug? |
新版本中应该已经解决了,你可以测试下3.2.5 |
3.2.5 版本中还是存在cli 模式接收不到参数。 yaf yaf support => enabled Directive => Local Value => Master Value |
Good afternoon, I got a similar problem with yaf 3.2.5 and php-cgi.exe. My configuration :
The exception raised is : Failed opening controller script C:\wwwroot\MyWebApp\application\controllers\MyWebApp.php: No such file or directory Before this test, I was using Yaf 3.1.2 with PHP 7.4.3 and it was running fine. Here are all the tests done with yaf versions from 3.1.2 to the latest available :
Best regards, MrJackDuaner |
trialUserExpire.php 大概是啥样的 |
@MrJackDuaner you should check whether the PATH_INFO evn variable is set, and wether it is expected. |
Good morning, Sorry for the long period without any answer. Last year, I didn't find the solution for PHP 7.4 / YAF 3.2.5. Here is the solution I have implemented. index.php : As I am working with IIS, the rewrite rule in web.config is : Thank you for pointing it in the right direction. I don't know if @hanwuqin has solved his issue, but for me it's good now. Thank you. Best regards, MrJackDuaner |
request.php
$request = new Yaf_Request_Simple("CLI", "Index", "Controller", "Hello", array("para" => 2));
print_r($request);
打印的结果:
[root@localhost cea]# php request.php
Yaf_Request_Simple Object
(
[method] => CLI
[module] => Index
[controller] => Controller
[action] => hello
[uri:protected] =>
[base_uri:protected] =>
[dispatched:protected] =>
[routed:protected] => 1
[language:protected] =>
[params:protected] => Array
(
)
)
params 无内容,和文档上的结果不一样呢:
运行输出:
The text was updated successfully, but these errors were encountered: