换成php7.4修复警告
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
ini_set('memory_limit', '-1'); //不限制内存
|
ini_set('memory_limit', '-1'); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>
|
||||||
date_default_timezone_set('Asia/Shanghai'); //中国时间
|
date_default_timezone_set('Asia/Shanghai'); //<EFBFBD>й<EFBFBD>ʱ<EFBFBD><EFBFBD>
|
||||||
header("Content-Type: text/html; charset=gbk");//输出编码
|
header("Content-Type: text/html; charset=gbk");//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
include_once("config.php");
|
include_once("config.php");
|
||||||
function config(){
|
function config(){
|
||||||
$WebUrl = $_SERVER['HTTP_HOST'];
|
$WebUrl = $_SERVER['HTTP_HOST'];
|
||||||
$FileName = $_SERVER['PHP_SELF'];
|
$FileName = $_SERVER['PHP_SELF'];
|
||||||
$Folders = count(explode('/', $FileName));
|
$Folders = count(explode('/', $FileName));
|
||||||
|
$Folder = '';
|
||||||
if($Folders > 2){
|
if($Folders > 2){
|
||||||
for($i=3;$i<=$Folders;$i++){
|
for($i=3;$i<=$Folders;$i++){
|
||||||
$Folder.="../";
|
$Folder.="../";
|
||||||
@@ -44,8 +45,8 @@ function config(){
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
$GG=array_merge(array_change_key_case($_GET,CASE_LOWER),$_POST,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;
|
global $GG;
|
||||||
include($GG['Config']['Folder']."../class/".$class_name.".php");
|
include($GG['Config']['Folder']."../class/".$class_name.".php");
|
||||||
}
|
});
|
||||||
?>
|
?>
|
||||||
@@ -73,7 +73,7 @@ class Config_File {
|
|||||||
*
|
*
|
||||||
* @param string $config_path (optional) path to the config files
|
* @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))
|
if (isset($config_path))
|
||||||
$this->set_path($config_path);
|
$this->set_path($config_path);
|
||||||
|
|||||||
@@ -566,7 +566,7 @@ class Smarty
|
|||||||
/**
|
/**
|
||||||
* The class constructor.
|
* The class constructor.
|
||||||
*/
|
*/
|
||||||
function Smarty()
|
function __construct()
|
||||||
{
|
{
|
||||||
$this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME']
|
$this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME']
|
||||||
: @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);
|
: @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);
|
||||||
@@ -1954,11 +1954,11 @@ class Smarty
|
|||||||
function MakeHtmlFile($file_name, $c)
|
function MakeHtmlFile($file_name, $c)
|
||||||
{
|
{
|
||||||
if(!$fp = fopen($file_name, "wa")){
|
if(!$fp = fopen($file_name, "wa")){
|
||||||
echo "文件打开失败!";
|
echo "<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!fwrite($fp, $c)){
|
if(!fwrite($fp, $c)){
|
||||||
echo "文件写入失败!";
|
echo "<EFBFBD>ļ<EFBFBD>д<EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>";
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
/**
|
/**
|
||||||
* The class constructor.
|
* The class constructor.
|
||||||
*/
|
*/
|
||||||
function Smarty_Compiler()
|
function __construct()
|
||||||
{
|
{
|
||||||
// matches double quoted strings:
|
// matches double quoted strings:
|
||||||
// "foobar"
|
// "foobar"
|
||||||
|
|||||||
Reference in New Issue
Block a user