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

PHP
利用discuz实现PHP大文件上传应用实例代码
php 遍历显示文件夹下所有目录、所有文件的函数,没有分页的代码
php在字符串中查找另一个字符串
php下HTTP Response中的Chunked编码实现方法
PHP实现定时生成HTML网站首页实例代码
PHP下一个非常全面获取图象信息的函数
PHP strtr() 函数使用说明
php 删除无限级目录与文件代码共享
php AJAX实例根据邮编自动完成地址信息
php miniBB中文乱码问题解决方法
cmd下运行php脚本
PHP 遍历XP文件夹下所有文件
php 移除数组重复元素的一点说明
discuz论坛 用户登录 后台程序代码
Optimizer与Debugger兼容性问题的解决方法
Zend Studio 无法启动的问题解决方法
php 页面执行时间计算代码
php smarty的预保留变量总结
php获取网页内容方法总结
php读取msn上的用户信息类

使用eAccelerator加密PHP程序


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