从shell或apache服务器运行PHP脚本
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了从shell或apache服务器运行PHP脚本,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1418字,纯文字阅读大概需要3分钟。
内容图文
![从shell或apache服务器运行PHP脚本](/upload/InfoBanner/zyjiaocheng/961/7dc8522ef5de4e66ace150404fa5ae1b.jpg)
从shell执行的脚本是否具有从浏览器执行的确切功能?或者编码有什么不同.
从shell运行脚本以提高性能是否更好?从windows或unix / linux运行它更好
我问所有这些问题因为,我想开发一个PHP脚本,可以从MySQL数据库中列出的一些URL的http头中获取一些数据,然后将数据存储在数据库中.
你能指点我正确的方向,我需要ubuntu,还是有一个可以从windows运行php的shell?我现在所有安装的都是WAMP,它有mysql,php和apache服务器.
我很抱歉是新手.
谢谢你的帮助
解决方法:
I am wondering if a PHP script can be executed from a shell command line.
是
Does a script executed from shell have the exact functionality if executed from the browser? or is there a difference in coding.
它不会有$_REQUEST和朋友填充,$_SERVER也不会有服务器信息.
Is it better to run a script from shell for performance
也许.它避免了运行Web服务器的开销.它会阻止您在内存中缓存版本以便更快地重新执行.
and also is it better to run it from windows or unix/linux
基准吧.
I am asking all these questions because, I am suppose to develop a PHP script that can fetch some data from http headers of some urls listed in a MySQL db and then store the data in the database.
似乎没有必要涉及Web服务器.
Can you guys point me to the right direction please, Do I need ubuntu, or is there a shell that can run php from windows?
标准的Windows shell可以.
all I have at the moment installed is WAMP, which has mysql, php and apache server.
您将需要PHP的命令行版本.我不知道WAMP是否包括它.
内容总结
以上是互联网集市为您收集整理的从shell或apache服务器运行PHP脚本全部内容,希望文章能够帮你解决从shell或apache服务器运行PHP脚本所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。