簡體   English   中英

得到403由於某種原因我認為PHP錯誤

[英]Get 403 For some reason PHP error i think

好的,所以我最近決定將維護頁面添加到我的站點,並且它是一個.php文件,因此當我啟用它對其進行測試時,即使使用其他PC,網絡,我也遇到403錯誤。我什至嘗試使用VPN。有人解釋為什么我啟用它后會得到403頁嗎????

    <?php
session_id();
session_start();
ob_start();
date_default_timezone_set('America/Chicago');
$connection = mysql_pconnect("Hidden","Hidden","Hidden"); or die ("Error connecting to database.");
mysql_select_db("Hidden") or die ("Error connecting to database, hang tight, we are working on it.");
mysql_select_db("Hidden") or die ("Error connecting to database, hang tight, we are working on it.");


?>
<style>
body {
color:white;
font-family:Segoe UI;
}
body { background-image:url("http://www.freegreatpicture.com/files/191/20288-gyrosigma-light-blue-background.jpg"); }
#Opacity {
background: url(Opacity.png);
padding:12px;
border:1px solid #969696;
border-radius:6px;
width:380px;
}

h3 {
color:#F5F5F5;
font-size:25px;
margin:0;
padding:0;
padding-bottom:10px;
}

#h3sub {
color:#F5F5F5;
font-size:18px;
}

h2 {
color:#F5F5F5;
text-shadow:1px 0px 0px #999;
margin:0;
padding:0;
padding-bottom:10px;
}

input[type=text] {
width:300px;
background:white;
border:1px solid #999;
padding:4px;
font-family:Segoe UI;
border-radius:5px;
}

input[type=password] {
width:300px;
background:white;
border:1px solid #999;
padding:10px;
font-family:Segoe UI;
border-radius:7px;
}

#btn {
background:rgb(34,51,136);
padding:4px;
border-radius:7px;
color:white;
font-family:Verdana;
font-size:30px;
font-weight:bold;
text-shadow:1px 0px 0px rgb(34,34,34);
</style>
<center><td valign='top'>
            <center><img src='http://i.imgur.com/q1CODHB.png'></center>
        </td>
<div style='padding-bottom:0px;'></div>
<table>
        <h1><B><font color='darkred'>Maintenance Protocol</FONT></B></h1>
<h4><B><font color='darkred'>Gravitar is currently offline for maintenance and upgrades.</FONT></B></h4>
<h4><B><font color='darkred'>You will be redirected back to the website when this process is complete.</FONT></B></h4>
<br>
</br>
    <tr>

        <td valign='top'>
            <div id='Opacity'>
                        <h0><B><font color='darkblue'>Gravitar</FONT></B></h0>
                        <h2><font color='darkblue'>Developer Login</FONT></h2>
            <form action='' method='POST'>
                <table>
                    <tr>
                        <td>
                            <input type='password' name='Password' placeholder='Passcode...'>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type='submit' name='submit' value='U'>
    <input type='submit' name='submit' value='N'>
<input type='submit' name='submit' value='I'>
<input type='submit' name='submit' value='V'>
<input type='submit' name='submit' value='E'>
<input type='submit' name='submit' value='R'>
<input type='submit' name='submit' value='O'>
<input type='submit' name='submit' value='U'>
<input type='submit' name='submit' value='S'>

                        </td>
                    </tr>
                </table>
            </form>
            </div>
        </td>
    </tr>
</table>
<?php
$Password = mysql_real_escape_string(strip_tags(stripslashes($_POST['Password'])));
$submit = mysql_real_escape_string(strip_tags(stripslashes($_POST['submit'])));

    if ($submit) {

        $Passcode = "5y24G4H@$%Y56herGerefVVVVVVVerqcdfllllLOLFwew4wF!@#$";

        if ($Password == $Passcode) {

            $_SESSION['Admin']="hi";
            header("Location: index.php");

        }

    }
echo"<h4><center><font color='darkblue'>&copy Void Team Corporation. All Rights Reserved.</font></h4></center>";
?>
<?php
echo"</div></div>";
include "../Footer.php";
?>

不建議使用Mysql連接請求命令時使用PDO連接請求命令

如果您甚至收到錯誤,請執行以下步驟

檢查URL錯誤,並確保您指定的是實際的網頁文件名和擴展名,而不僅僅是目錄。 大多數網站都配置為禁止目錄瀏覽,因此在嘗試顯示文件夾而不是特定頁面時出現403禁止消息是正常現象,這是正常現象。

注意:到目前為止,這是網站返回403 Forbidden錯誤的最常見原因。 在花費時間進行以下故障排除之前,請確保您充分探索了這種可能性。

確保您使用了正確的包含URL。

確保您在HostManager中已正確選擇了CHOMD,並且應該給予讀寫權限。

如果您已完成該操作,但仍然無法訪問它,則請確保該文件位於任何子目錄下,請確保甚至向該文件夾提供了正確的CHOMD權限。

最大可能的錯誤是**獲得訪問權限**,因此可以按照上述步驟解決。

因為這是HTTP錯誤,並且您正在使用.php文件,因此即使預先檢查您的任何錯誤,htaccess文件也可能會出現問題。

即使您沒有得到解決方案,也可以ping通我。

希望這兩者一定能幫助您走出錯誤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM