如果我想使用安装程序(操作系统的软件包系统)分发 PHP 应用程序,我应该如何进行?我不希望 PHP 文件在那里,只是工作应用程序,所以当我在控制台中输入“app”时,它最终会启动应用程序,而不需要在系统上安装 PHP(不需要在主机上安装 php)。我还希望应用程序具有可修补的字节码,因此它是分成几部分的,在需要时加载,并且只有部分需要在更新时替换。
我现在要做的如下:
->Compile PHP with extensions for specific platform.
->Make binary application which launches '/full/php app' when app is launched.
->Pack it in installer in a way, that there would be binary added to path when added, launching specific installation of PHP which is alongside the app with argument of start point->App would be running.
Run Code Online (Sandbox Code Playgroud)
问题是:
也许我不希望我的 PHP 文件被公开(在应用程序中,无论如何都会有可用的源代码)是否有一些现成的东西可以做到这一点?有比我建议的更好的方法吗?
替代方案:修改 OP 缓存以与“打包”应用程序一起使用,将字节码传递到修改后的 OP 缓存,后者仅读取缓存。