加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

如何在PHP中使用BLENC?

发布时间:2020-12-13 18:01:04 所属栏目:PHP教程 来源:网络整理
导读:我有一个testcode.php文件需要编码: ?php $hello = "Hello World!";? 我创建了文件encode.php来加密和测试该文件: ?php /* read the PHP source code */ $source_code = file_get_contents("testcode.php"); /* create the encrypted version */ $redistri
我有一个testcode.php文件需要编码:
<?php
    $hello = "Hello World!";
?>

我创建了文件encode.php来加密和测试该文件:

<?php
    /* read the PHP source code */
    $source_code = file_get_contents("testcode.php");

    /* create the encrypted version */
    $redistributable_key = blenc_encrypt($source_code,"encrypt.php");

    /* read which is the key_file */
    $key_file = ini_get('blenc.key_file');

    /* save the redistributable key */
    file_put_contents($key_file,$redistributable_key,FILE_APPEND);

    include 'encrypt.php';
    echo $hello;
?>

但是当我运行encode.php时,我收到了这些错误:

Warning: blenc_compile: Validation of script ‘encrypt.php’ failed.
MD5_FILE: 910e6a45f806ba3dc42830839971cb53
MD5_CALC: c38a6b2f389267a272ea656073a463ed in
C:xampphtdocsPHPEncodeencode.php on line 14

Fatal error: blenc_compile: Validation of script ‘encrypt.php’ failed,
cannot execute. in C:xampphtdocsPHPEncodeencode.php on line 14

帮我解决一下,谢谢!

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读