如何修复运行PHP脚本时收到此消息的错误?

时间:2015-10-09 02:08:07

标签: php

我在执行PHP脚本时收到错误消息

  

警告:未知:无法打开流:第0行的未知权限被拒绝

     

致命错误:未知:在未知状态下打开所需的'C:/wamp/www/injection/main_login_injection.php'(include_path ='。; C:\ php \ pear')失败0

代码如下:

<?php

include "database_injection.php";

if(isset($_GET['myusername'])){
    if(isset($_GET['mypassword'])){

        $password = $_GET['mypassword'];

        $sql = "SELECT * FROM registration WHERE password = {$mypassword} LIMIT 1";

        $query = $dbConn->query($sql);

        if($query){
            $_SESSION['username']= "myusername";
            $_SESSION['password']= "mypassword";
            header("location:login_success.php");
        }
        else{
            echo "Failure";
        }
    }
}
?>

1 个答案:

答案 0 :(得分:0)

从这个错误可以明显看出,确切的main_login_injection.php不在当前路径中,也不在包含路径中。检查两次。