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

相关文章

javascript数组与php数组的地址传递及值传递用法实例

本文实例讲述了javascript数组与php数组的地址传递及值传递用法。分享给大家供大家参考。具体如下: javascript数组为地址传递/引用传递,而php数组为值传递 实例代码如...

PHP传参之传值与传址的区别

废话不多说,先来看段代码 function test(&val){ return $val; } 其中为什么用到&进行传参呢,有什么好处? 传址是允许在函数内部进行改变的意思,比...

php设计模式 Adapter(适配器模式)

复制代码 代码如下: <?php /** * 适配器模式 * * 将一个类的接口转换成客户希望的另外一个接口,使用原本不兼容的而不能在一起工作的那些类可以在一起工作 */ // 这...

php Rename 更改文件、文件夹名称

php Rename 更改文件、文件夹名称

命令格式为: bool rename ( string oldname, string newname [, resource context] )   下面演示rename的具体应用:...

php导出excel格式数据问题

解决2个问题:1.身份证之类的文本数据自动转为科学计数法的问题。2.中文乱码的问题 excel从web页面上导出的原理。当我们把这些数据发送到客户端时,我们想让客户端程序(浏览器)以ex...