PHP 脚本作为单个二进制文件
我正在了解 Facebook 的开发步骤并获取代码,我认为他们正在将脚本制作为单个二进制文件并推送单个文件。我们有一个门户网站,里面有很多用 PHP 编码的文件。是否有任何编码器或编译器可以将所有文件捆绑在一个文件中?
当我们在重命名文件夹或提取文件并覆盖时将代码推送到服务器时,它开始给出错误垃圾邮件。
此外,欢迎任何在不出现任何错误的情况下发送网页的解决方案或方法。
谢谢
I was whatching facebook's development steps and getting codes live , i think they are making their script as a single binary and pushing a single file. We got a portal with alot of files inside which coded with PHP . is there any encoder or compiler can bundle all files in single one ?
While we are pushing our codes to our servers when renaming folder or extracting files and override , it starts to give error spam.
Also any solution or approach to send the webpages alive without getting any error are welcome.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可能需要 PHAR
You probably need PHAR
FaceBook 使用名为 HipHop 的工具,它将 PHP 编译为单个二进制可执行文件。
FaceBook use a tool named HipHop which compiles PHP into a single binary executable.
对于 Windows、Linux 和 FreeBSD,有 Roadsend PHP 编译器。它真正将 PHP 源代码编译为本机二进制格式。不需要口译员。
他们声称:“Roadsend PHP 是 PHP 语言的免费、开源实现。它包括一个生成本机二进制文件的编译器(无需解释器)。Roadsend Compiler 可以使用 Fast/CGI 构建在线 Web 应用程序,也可以使用嵌入式Web 服务器(MicroServer)和控制台应用程序。”
他们说:“使用 Roadsend 编译器编译的应用程序不需要 Zend 或任何其他解释器来执行。Roadsend 不隶属于 Zend 或 PHP Group,并且不与其 PHP 实现共享(也不是派生自)相同的代码库Roadsend PHP 是 PHP 的全新实现,在语法和语义上与 PHP Group 的 PHP 5.2.x 和 Zend Engine 2 兼容。” – Sebastián Grignoli 41 秒前编辑
“我怎么知道我的应用程序不会被反编译回 PHP 源文件?”
“使用 Roadsend 编译器编译 PHP 应用程序与将 C 文件编译为二进制格式非常相似。该程序会经历一个将纯文本源转换为适合处理器执行的二进制格式的过程,并且很难将其反编译回任何类型的高级编程语言。”
For Windows, Linux and FreeBSD there's Roadsend PHP Compiler. It truly compiles PHP source code into native binary format. No interpreter is required.
They claim: "Roadsend PHP is a free, open source implementation of the PHP language. It includes a compiler that produces native binaries (no interpreter required). Roadsend Compiler can build online web applications with Fast/CGI, offline web applications with an embedded web server (MicroServer), and console applications."
They say: "Applications compiled with the Roadsend Compiler do not require Zend or any other interpreter to execute. Roadsend is not affiliated with Zend or the PHP Group and does not share (nor is it derived from) the same code base as their PHP implementation. Roadsend PHP is an entirely new implementation of PHP that is syntactically and semantically compatible with PHP Group's PHP 5.2.x and the Zend Engine 2." – Sebastián Grignoli 41 secs ago edit
"How do I know that my application won't be decompiled back to the PHP source file?"
"The compiling of a PHP application with the Roadsend Compiler is much the same as compiling a C file to binary format. The program goes through a process that converts the plain text source into a binary format that is suitable for the processor to execute, and which is extremely hard to decompile back to any sort of high level programming language."