我使用Ioncube进行脚本混淆和工作,但如果脚本有mysqli函数(db,connect等),则无法正常工作。 工作脚本的示例:
<?php
session_start();
$errorMessage = "";
header('Content-Type: text/html; charset=utf-8');
include_once('language.php');
if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] === true) {
header('Location: index.php');
}
require_once('config.php');
if (isset($_POST['Username']) && isset($_POST['Password'])){
$log_username = $_POST['Username'];
$log_password = $_POST['Password'];
if($log_username == $username && $log_password == $password){
$_SESSION['logged_in'] = true;
header('Location: index.php');
}else{
$errorMessage="Wrong username/password.";
}
}
不行:
require_once("config.php");
$db = new mysqli($mysql_host, $mysql_user, $mysql_password) or die(__LINE__ . ' Invalid connect: ' . mysqli_error());
$db->select_db($mysql_database) or die( "Unable to select database. Run setup first.");
$stmt = $db->prepare("SELECT * FROM messages WHERE status = 0");
$success = $stmt->execute();
$stmt->store_result();
$num_rows_victim = $stmt->num_rows;
$stmt->close();
它给出了这样一条错误消息:
[04-Dec-2016 11:15:26 Europe/Moscow] PHP Fatal error: Class '[obfuscated]' not found in /home/u6820440/public_html/test/index.php on line 0
我找了所有论坛,但我找不到任何解决方案。