“编译php”就像让它变得便携一样
我对编译性能不感兴趣,而是对能够“编译”php 脚本以便将其保存在 USB 记忆棒或便携式硬盘驱动器上感兴趣。
我认为可能有两种方式:
- 便携式 Apache
- 便携式命令行 php
我知道存在一些软件包,例如 xampp 等,以及使用 php bin 文件,但我想知道是否存在更用户友好的东西,我的意思是我只需双击,打开浏览器即可使用。
I'm not intrested in compiling for performance but in being able to "compile" a php script in order to carry it on a usb stick or portable hard drive.
I think that there may be two way:
- Portable Apache
- Portable command line php
I undersand that some package such as xampp and so on exists, as well as using the php bin files but I was wondering if something more user friendly exists, I mean something that I can just double click, open a browser and use.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
PHP 仅被解释。 XAMPP 仅设置一个带有 apache 服务器、数据库和 PHP 引擎的模拟环境。不幸的是,就能够启动 PHP 应用程序而言,XAMPP 的速度和可移植性差不多。
如果你想出一种方法来按照你想要的方式去做 - 给我发消息 - 我会付钱......
PHP is only interpreted. XAMPP merely sets up a mock environment with an apache server, a database, and the PHP engine. Unfortunately, XAMPP is about as fast and portable you're going to get in terms of being able to fire up a PHP app.
If you figure out a way to do it the way you're looking to - message me - I'll pay for it...
搜索网络给我这个
和这个
我发现了两个本机 PHP 编译器。
searching the web gives me this
and this
Two native PHP compiler i found.
PHP 5.4+ 有一个内置的网络服务器...我能够简单地将我的 php 可执行文件复制到随机文件夹中并且...
# ~/someDir/php -S localhost:7676 -t ~/docRoot ENTER
浏览到 http://localhost:7676 就可以了。
如果您想要更多的可移植性,您可以使用构建命令(例如
./configure --enable-static --disable-shared --disable-all
)深入研究重新编译 PHP 的世界PHP 5.4+ has a built-in webserver... I was able to simple copy my php executable into a random folder and...
# ~/someDir/php -S localhost:7676 -t ~/docRoot
ENTERBrowse to http://localhost:7676 and you're good to go.
If you want even more portability, you can delve into the world of recompiling PHP with a build command such as
./configure --enable-static --disable-shared --disable-all