朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

Typecho强制登录代码

把下面这行代码插入到主题header.PHP(每个地方都引用的文件)

<?php if(!$this->user->hasLogin()){
    echo '<script> location.href="';?><?php echo $this->options->adminUrl("login.php").'"</script>';
} ?>

插入后没登陆的用户访问会自动跳转到登录页面,虽然这种行为非常的笨蛋,但是万一呢。

赞(1) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » Typecho强制登录代码

评论 72

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #75

    Hello. And Bye Bye Bye.

    Larryescop1天前回复
  2. #74

    cancun new hotels
    http://www.vocal.com.ua/node/58537

    Sharlesglltf1个月前 (01-07)回复
  3. #73
  4. #72
  5. #71
  6. #70

    cancun resorts all inclusive family
    family vacation in cancun mexico

    Sharlesyirjg1个月前 (01-05)回复
  7. #69

    me cancun all inclusive
    hotels in cancun for spring break

    Sharlesxifon1个月前 (01-05)回复
  8. #68

    best excellence resort 2021
    excellence riviera cancun 2 story terrace

    Sharlesodgqz1个月前 (01-05)回复
  9. #67

    all inclusive family resorts in cancun mexico
    cancun deals 2022

    Sharleslhium1个月前 (01-04)回复
  10. #66

    cancun hotel zone all inclusive
    all inclusive package to cancun mexico

    Sharlesihgrx1个月前 (01-03)回复
  11. #65

    tulum mexico all inclusive resorts adults only
    cheap hotel deals cancun

    Sharlesuhgei1个月前 (01-03)回复
  12. #64

    cheap all inclusive cancun with airfare
    mexico hotel zone

    Sharlesdrqyi1个月前 (12-31)回复