当前位置: 首页 > 图文教程 > 网络编程 > PHP > 使用eAccelerator加密PHP程序

PHP
解决MySQL中文输出变成问号的问题
PHP页面间传递参数实例代码
php下通过POST还是GET来传值
PHP组合查询多条件查询实例代码
PHP简单系统查询模块代码打包下载
PHP添加MySQL数据记录代码
PHP insert语法详解
用PHP进行MySQL删除记录操作代码
PHP简单系统数据添加以及数据删除模块源文件下载
用PHP连接MySQL代码的参数说明
PHP实现MySQL更新记录的代码
PHP-MySQL教程归纳总结
PHP时间戳使用实例代码
PHP中MD5函数使用实例代码
php mysql索引问题
介绍php设计模式中的工厂模式
Php注入点构造代码
坏狼的PHP学习教程之第1天
坏狼的PHP学习教程之第2天
坏狼的PHP学习教程之第3天

使用eAccelerator加密PHP程序


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 165 ::
收藏到网摘: n/a

这款软件的功能就是通过在内存中缓存PHP文件从而加速PHP程序的执行速度。由于MMCache的原作者被Zend挖走,MMCache的开发一直处于停滞状态。而Eaccelerator却借鉴了MMCache的优点而一直在不断的更新。 使用 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 含底下所有子目录