Php 编辑未链接的脚本时MySQLI崩溃
我已经为一个网站写了几个脚本,正在进入下一页的信息 每次我编辑一个页面,第一个页面就会崩溃 .htaccess:Php 编辑未链接的脚本时MySQLI崩溃,php,.htaccess,mysqli,Php,.htaccess,Mysqli,我已经为一个网站写了几个脚本,正在进入下一页的信息 每次我编辑一个页面,第一个页面就会崩溃 .htaccess: RewriteRule ^timeline(\d+)*$ ./dashboard.php RewriteRule ^timeline/like/(\d+)*$ ./dashboard.php?action=Like&PostID=$1 RewriteRule ^timeline/dislike/(\d+)*$ ./dashboard.php?action=Dislike&am
RewriteRule ^timeline(\d+)*$ ./dashboard.php
RewriteRule ^timeline/like/(\d+)*$ ./dashboard.php?action=Like&PostID=$1
RewriteRule ^timeline/dislike/(\d+)*$ ./dashboard.php?action=Dislike&PostID=$1
RewriteRule ^report/(\d+)*$ ./report.php?postID=$1
RewriteRule ^profile/(\d+)*$ ./profile.php?profile=$1
RewriteRule ^profile/edit/(\d+)*$ ./editprofile.php
每页的代码:
error_reporting(E_ALL);
ini_set('display_errors', '1');
require_once('core/connection.php');
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this page
if(!function_exists("isAuthorized")) {
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "/login/error/2";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
$MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
}
但每次我上传一个包含此代码的页面时,第一个页面就会崩溃。那么如果我把它移除,它就会工作
任何想法都会有帮助。快速评论,加入codeif!函数_existsisAuthorized{代码它循环页面,大约15行,然后将停止并循环一次又一次。修复了该错误,供将来参考,请不要使用与您正在处理的文件名相同的文件名。由于某些原因,它将循环。。。