[英]How to run PHP scripts on server without updating server's files
I need to run PHP scripts on server without having to update files it stores - perform testing on real server before deployment. 我需要在服务器上运行PHP脚本而不必更新其存储的文件-部署前在真实服务器上执行测试。 Server has access to database which is inaccessible from outside. 服务器有权访问无法从外部访问的数据库。 For this reason I can't run my scripts locally, I need to run them within server's environment, but I don't want to update files stored on server. 因此,我无法在本地运行脚本,我需要在服务器环境中运行脚本,但是我不想更新存储在服务器上的文件。 Is there any way to do so? 有什么办法吗? Is there a tool for remote PHP debugging? 是否有用于远程PHP调试的工具?
There are several ways to achieve this thing 有几种方法可以实现这一目标
I have found a solution - XDebug for PHP. 我找到了一个解决方案-XDebug for PHP。 However as was mentioned in comments, testing against copy of DB and using virtualization is a more common approach, which I personally will probably stick to. 但是,正如评论中提到的那样,针对数据库副本进行测试并使用虚拟化是一种更常见的方法,我个人可能会坚持使用。 For those who are still determined to go the "hard" way, here is a link to HOWTO on XDebug installation for PHP on Ubuntu - http://ubuntuforums.org/showthread.php?t=525257 . 对于那些谁仍然决定去“硬”的方式,这里是在Ubuntu到HOWTO的链路上的XDebug安装了PHP - http://ubuntuforums.org/showthread.php?t=525257 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.