Home >Backend Development >PHP Tutorial >eaccelerator Use eAccelerator to encrypt PHP programs

eaccelerator Use eAccelerator to encrypt PHP programs

WBOY
WBOYOriginal
2016-07-29 08:39:04863browse

Use eAccelerator to encrypt PHP programs

Copy code The code is as follows:


# /usr/local/bin/encoder


After execution, you will see simple instructions:

Copy code Code As follows:


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


You should know how to use it after playing with it for a while...
Use encoder to encrypt and encode the PHP program, which will generate another file. You can also You can convert the entire directory, for example:

Copy the code The code is as follows:


# encoder code -rcf -sphp -sinc -o code_encoded


This command will convert all php / inc in the code/ directory The file at the end is encoded and stored 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.,
will also be copied intact. Copy it to code_encoded, so that you can provide services directly in this directory.
Option -r includes all subdirectories below

The above introduces eaccelerator and uses eAccelerator to encrypt PHP programs, including the content of eaccelerator. I hope it will be helpful to friends who are interested in PHP tutorials.

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