Php define()页面访问被拒绝

时间:2017-06-25 12:30:33

标签: php

我的问题在于define()header()

header()部分在视频播放器中不起作用。

实施例: enter image description here

的index.php

define('access', true);

video.php

if(accsess == true){ 
    echo "Hacking?";
} else { 

    $token = $_GET['token'];

    $query4 = "SELECT url FROM video WHERE token = $token";
    $stmt = $db->prepare($query4);
    $stmt->execute();
    $row = $stmt->fetch();
    $direction = $row['url'];

    if($row){
        header("Location:".$direction);
    }else {
        echo "Hacking?";
    }

} 

0 个答案:

没有答案