代码点火器和 PHP CLI
有人遇到过 PHP CLI 和 CI 2.02 的问题吗?我最近切换了主机,现在每当我尝试执行时
/usr/local/bin/php /home/userName/public_html/index.php controllerName functionName
,我都会得到一个空白输出,它甚至看起来都没有执行该函数,因为我在那里有一个 echo 语句。 如果我执行我创建的一个简单文件,它就可以正常工作。
我不知道 PHP 或 Apache 配置是否需要更改。
Has anyone had a problem with PHP CLI and CI 2.02? I recently switched hostings and now whenever i try to execute
/usr/local/bin/php /home/userName/public_html/index.php controllerName functionName
I get a blank output, it does not even seem like it executes the function since I have a echo statement in there.
If I execute a simple file I created, it works OK.
I don't know if it is something that needs to be changed in PHP or Apache config.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是 URI 没有被传递,并且我的网站已关闭错误,因此我看不到任何错误消息。打开错误日志后,我发现我设置了错误的 URI。
The problem was that URI was not being passed and my site had the errors turned off so I could not see any of the error messages. After getting the Error Logs turned on I was able to see I had the wrong URI set.