如何使用eAccelerator加密PHP程式

來源:互聯網
上載者:User

使用eAccelerator通過在記憶體中緩衝PHP檔案從而加速PHP程式的執行速度。由於MMCache的原作者被Zend挖走,MMCache的開發一直處於停滯狀態。而Eaccelerator卻借鑒了MMCache的優點而一直在不斷的更新。

例子,使用 eAccelerator 加密PHP程式。

  1. # /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 程式加密編碼,會產生另外一個檔案,也可以對整個目錄作轉換,例如:

  1. # encoder code -rcf -sphp -sinc -o code_encoded
複製代碼

這個命令會把 code/ 目錄下所有的 php / inc 結尾的檔案作編碼,並存放到 code_encoded 下面, 同時,由於指定了 -c 這個選項,其他格式、不需編碼的檔案,如 jpg/gif/html/js 等, 也會原封不動複製一份到 code_encoded 下面,這樣方便你直接以這個目錄來提供服務。 選項 -r 含底下所有子目錄。

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.