Deploying PHP Site so that code cannot be viewed/edited
I'm about to deploy a PHP application which I've just developed on to my clients in-house server. I have created this as a product and do not want my client to be able to view/edit the code which I want to control. Could anybody tell me if there is any way of creating a binary of the complete 开发者_Go百科site? Or would code obfuscation be the key?
Just to note that I intend to deploy the same virtual environment which I have been developing in which is Turnkey LAMP stack.
PHP is an interpreted language so by it's very nature anyone with access to the webserver can view/modify the code (which is why I also try to host my clients' apps myself to give me control). There are however various code obfuscators (Google them) which render PHP pretty unreadable, of course you keep hold of the original source for maintenance etc.
Also have a look at HipHop, facebook's new platform which converts PHP into C++ then compiles it, although that might be overkill for most web applications - https://github.com/facebook/hiphop-php/wiki/
You can encode it -> http://www.zend.com/en/products/guard/ or http://www.ioncube.com/sa_encoder.php
精彩评论