From dc2b20ab8c90a4615d18917cf01479166c8e431e Mon Sep 17 00:00:00 2001 From: chaiyewu <562794175@qq.com> Date: Tue, 24 Feb 2026 13:51:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=A2=E6=88=90php7.4=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GonghuiWeb/inc/class.php | 11 ++++++----- GonghuiWeb/ppxq/Config_File.class.php | 2 +- GonghuiWeb/ppxq/Smarty.class.php | 6 +++--- GonghuiWeb/ppxq/Smarty_Compiler.class.php | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/GonghuiWeb/inc/class.php b/GonghuiWeb/inc/class.php index 885d3ce7..e7d53ecc 100644 --- a/GonghuiWeb/inc/class.php +++ b/GonghuiWeb/inc/class.php @@ -1,12 +1,13 @@ 2){ for($i=3;$i<=$Folders;$i++){ $Folder.="../"; @@ -44,8 +45,8 @@ function config(){ )); } $GG=array_merge(array_change_key_case($_GET,CASE_LOWER),$_POST,config()); -function __autoload($class_name){ +spl_autoload_register(function($class_name){ global $GG; include($GG['Config']['Folder']."../class/".$class_name.".php"); -} +}); ?> \ No newline at end of file diff --git a/GonghuiWeb/ppxq/Config_File.class.php b/GonghuiWeb/ppxq/Config_File.class.php index 5787ad15..8be638fe 100644 --- a/GonghuiWeb/ppxq/Config_File.class.php +++ b/GonghuiWeb/ppxq/Config_File.class.php @@ -73,7 +73,7 @@ class Config_File { * * @param string $config_path (optional) path to the config files */ - function Config_File($config_path = NULL) + function __construct($config_path = NULL) { if (isset($config_path)) $this->set_path($config_path); diff --git a/GonghuiWeb/ppxq/Smarty.class.php b/GonghuiWeb/ppxq/Smarty.class.php index 6420b48f..132f8885 100644 --- a/GonghuiWeb/ppxq/Smarty.class.php +++ b/GonghuiWeb/ppxq/Smarty.class.php @@ -566,7 +566,7 @@ class Smarty /** * The class constructor. */ - function Smarty() + function __construct() { $this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']); @@ -1954,11 +1954,11 @@ class Smarty function MakeHtmlFile($file_name, $c) { if(!$fp = fopen($file_name, "wa")){ - echo "Îļþ´ò¿ªÊ§°Ü£¡"; + echo "�ļ���ʧ�ܣ�"; return false; } if(!fwrite($fp, $c)){ - echo "ÎļþдÈëʧ°Ü£¡"; + echo "�ļ�д��ʧ�ܣ�"; fclose($fp); return false; } diff --git a/GonghuiWeb/ppxq/Smarty_Compiler.class.php b/GonghuiWeb/ppxq/Smarty_Compiler.class.php index 1178b84d..71cfe2bd 100644 --- a/GonghuiWeb/ppxq/Smarty_Compiler.class.php +++ b/GonghuiWeb/ppxq/Smarty_Compiler.class.php @@ -78,7 +78,7 @@ class Smarty_Compiler extends Smarty { /** * The class constructor. */ - function Smarty_Compiler() + function __construct() { // matches double quoted strings: // "foobar"