使用eAccelerator加密PHP程序

yipeiwu_com6年前PHP代码库
使用 eAccelerator 加密PHP程序
复制代码 代码如下:

# /usr/local/bin/encoder

执行后会看到简单的使用说明:
复制代码 代码如下:

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 含底下所有子目录

相关文章

PHP的简易冒泡法代码分享

很基础的东西,感觉代码还不够简洁,希望高手指导修改 复制代码 代码如下: <?php function BubbleSort($str){ for($i=0;$i<count...

PHP资源管理框架Assetic简介

Assetic是一个PHP的资源管理框架,用于合并和压缩 CSS/JS 资源。示例代码如下:复制代码 代码如下:<?phpuse Assetic\Asset\AssetCollec...

解析在PHP中使用全局变量的几种方法

简介即使开发一个新的大型PHP程序,你也不可避免的要使用到全局数据,因为有些数据是需要用到你的代码的不同部分的。一些常见的全局数据有:程序设定类、数据库连接类、用户资料等等。有很多方法能...

PHP面向对象分析设计的61条军规小结

(1)所有数据都应该隐藏在所在的类的内部。 (2)类的使用者必须依赖类的共有接口,但类不能依赖它的使用者。 (3)尽量减少类的协议中的消息。 (4)实现所有类都理解的最基本公有接口[例如...

php自定义函数实现JS的escape的方法示例

本文实例讲述了php自定义函数实现JS的escape的方法。分享给大家供大家参考,具体如下: //php function function escape($string) {...