Home  >  Article  >  Backend Development  >  How to encrypt PHP programs using eAccelerator

How to encrypt PHP programs using eAccelerator

WBOY
WBOYOriginal
2016-07-25 09:12:53908browse

Use eAccelerator to speed up the execution of PHP programs by caching PHP files in memory. Since the original author of MMCache was poached by Zend, the development of MMCache has been at a standstill. Eaccelerator, on the other hand, draws on the advantages of MMCache and has been constantly updated.

Example, use eAccelerator to encrypt PHP program.

  1. # /usr/local/bin/encoder
Copy the code

You will see the instructions after execution: Usage: encoder [options] source_file_name encoder [options] source_file_name... encoder [options] source_directory_name... Options: -s suffix encode files only with following suffix (default is "php") -a encode all files (no by default) -l follow symbolic links (no by default) -r encode directories recursively (no by default) -c copy files those shouldn't be encoded (no by default) -f overwrite existing files (no by default) -w exclude check for eaccelerator_load() and subsequent warning -o target If you encode only one script then 'target' specifies an output file name. If you encode directory or several files at once then 'target' specifies an output directory name. Examples: encoder some_file.php encoder some_file.php -o some_encoded_file.php encoder *.php -o some_dir encoder ~/public_html/x -rcf -sphp -sinc -o ~/public_html/y

Use encoder to encrypt and encode the PHP program, which will generate another file. You can also convert the entire directory, for example:

  1. # encoder code -rcf -sphp -sinc -o code_encoded
Copy code

This command will encode all files ending in php / inc in the code/ directory and store them under code_encoded , At the same time, because the -c option is specified, files in other formats that do not require encoding, such as jpg/gif/html/js, etc., It will also be copied intact under code_encoded, so that you can provide services directly in this directory. Option -r includes all subdirectories below.



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn