问题
I have a website of one company that I need to support. Guys who were supporting that website gave me all the archives with files and db to move it to my hosting. I moved it and it was all good to this day. I found one issue - the email form doesn't work. I figured that I need to change mail-server settings but I can't do it, because file with this settings are encoded by ionCube. I have it installed on my hosting, but on my local computer I can't edit this file. Is there some way to display this php-file after decode through php on server-side?
回答1:
There's no legal way to do this, and files are compiled to bytecode so source code is gone. While it makes excellent sense to protect website files to make it harder for hackers to find sensitive data such as database connection details when they break into a server, and doing so can also make it much harder to introduce malware without breaking a site in the process, the original files should be kept somewhere too so that updates can be made. It sounds as though this was the motivation behind the protection that you have come across, and if you should go back to the people who provided the scripts, perhaps they will have the non-encoded versions too (they should!). If not and if the mail scripts are opensource, you may find non-encoded master files on the web that you can recreate the files with. Worst case, you may need to write a new form, but that shouldn't be too onerous. (disclosure, I am associated with ionCube).
来源:https://stackoverflow.com/questions/20216716/how-to-display-ioncube-decoded-php-file-through-php-code