1. 论坛系统升级为Xenforo,欢迎大家测试!
    Dismiss Notice

PHP代码如何加密部分内容

Discussion in '后端开发' started by A君, Sep 14, 2009.

  1. A君

    A君 Well-Known Member

    Joined:
    Aug 31, 2005
    Messages:
    19,987
    Likes Received:
    98
    代码怎么写?
    加密部分需要写入密码方可进入查看
     
  2. bootini

    bootini Active Member

    Joined:
    Nov 1, 2008
    Messages:
    2,084
    Likes Received:
    1
    技术帖,路过。
     
  3. shangjay

    shangjay New Member

    Joined:
    Jan 13, 2006
    Messages:
    3,530
    Likes Received:
    15
  4. junp

    junp New Member

    Joined:
    Nov 6, 2005
    Messages:
    1,259
    Likes Received:
    4
    加密PHP代码,还是用PHP加密内容?
     
  5. A君

    A君 Well-Known Member

    Joined:
    Aug 31, 2005
    Messages:
    19,987
    Likes Received:
    98
    加密内容。
    输入密码后,可以查看内容。

    密码就写到本页面里。可方便定期修改。
     
  6. junp

    junp New Member

    Joined:
    Nov 6, 2005
    Messages:
    1,259
    Likes Received:
    4
    将要加密的内容用分界符标识出来,比如
    在将内容输出前,只要将[hide][/hide]部分隐藏就行了。
     
  7. webren

    webren New Member

    Joined:
    Sep 6, 2008
    Messages:
    2,934
    Likes Received:
    0
    用js不可以吗?
     
  8. Sunya

    Sunya Member

    Joined:
    Sep 9, 2005
    Messages:
    954
    Likes Received:
    1
    .htaccess 不就可以咯, 哈哈
     
  9. ylcherry

    ylcherry New Member

    Joined:
    Jun 9, 2009
    Messages:
    288
    Likes Received:
    0
  10. fen

    fen New Member

    Joined:
    Dec 18, 2005
    Messages:
    3,050
    Likes Received:
    25
    老A和老鬼PK PHP
     
  11. lane

    lane New Member

    Joined:
    Sep 5, 2005
    Messages:
    6,548
    Likes Received:
    29
    啥意思?是这样么?

    $pw = 'aijunmjj';
    if($_GET['pw']==$pw || $_POST['pw']==$pw){
    echo 'A军MJJ';
    }else{
    echo '输入脱裤密码才可以看到';
    }