使用eAccelerator加密PHP程序
更新時間:2008年10月03日 20:39:53 作者:
這款軟件的功能就是通過在內存中緩存PHP文件從而加速PHP程序的執(zhí)行速度。由于MMCache的原作者被Zend挖走,MMCache的開發(fā)一直處于停滯狀態(tài)。而Eaccelerator卻借鑒了MMCache的優(yōu)點而一直在不斷的更新。
使用 eAccelerator 加密PHP程序
# /usr/local/bin/encoder
執(zhí)行后會看到簡單的使用說明:
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' specifyes an output
file name. If you encode directory or several files at once
then 'target' specifyes 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
稍微玩一下應該就知道怎 用了...
使用 encoder 去對 PHP 程式加密編碼,會產生另外一個檔案,你也可以對整個目錄作轉換,例如:
# encoder code -rcf -sphp -sinc -o code_encoded
這個命令會把 code/ 目錄下所有的 php / inc 結尾的檔案作編碼,并存放到 code_encoded 下面,
同時,由于指定了 -c 這個選項,其他格式、不需編碼的檔案,如 jpg/gif/html/js 等,
也會原封不動復制一份到 code_encoded 下面,這樣方便你直接以這個目錄來提供服務。
選項 -r 含底下所有子目錄
復制代碼 代碼如下:
# /usr/local/bin/encoder
執(zhí)行后會看到簡單的使用說明:
復制代碼 代碼如下:
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' specifyes an output
file name. If you encode directory or several files at once
then 'target' specifyes 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
稍微玩一下應該就知道怎 用了...
使用 encoder 去對 PHP 程式加密編碼,會產生另外一個檔案,你也可以對整個目錄作轉換,例如:
復制代碼 代碼如下:
# encoder code -rcf -sphp -sinc -o code_encoded
這個命令會把 code/ 目錄下所有的 php / inc 結尾的檔案作編碼,并存放到 code_encoded 下面,
同時,由于指定了 -c 這個選項,其他格式、不需編碼的檔案,如 jpg/gif/html/js 等,
也會原封不動復制一份到 code_encoded 下面,這樣方便你直接以這個目錄來提供服務。
選項 -r 含底下所有子目錄