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

PHP
PHP实时显示输出
php生成缩略图的类代码
php相当简单的分页类
smarty section简介与用法分析
php优化及高效提速问题的实现方法
php下实现在指定目录搜索指定类型文件的函数
PHP base64+gzinflate压缩编码和解码代码
脚本安全的本质_PHP+MYSQL
使用eAccelerator加密PHP程序
PHP注释实例技巧
php 友好URL的实现(吐血推荐)
关于DISCUZ不用通行证登陆得内容介绍
不用mod_rewrite直接用php实现伪静态化页面代码
Cannot modify header information错误解决方法
php获取地址栏信息的代码
php email邮箱正则
php preg_match_all结合str_replace替换内容中所有img
PHP中str_replace函数使用小结
Zend studio for eclipse中使php可以调用mysql相关函数的设置方法
php flush类输出缓冲剖析

使用eAccelerator加密PHP程序


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 123 ::
收藏到网摘: 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 含底下所有子目录