Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
适配PHP8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
owo233 committed Oct 9, 2023
1 parent 560f181 commit beb70b5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions core/common.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?php

use core\lib\Config;
use core\lib\Route;

error_reporting(0);
ini_set("display_errors", 0);
header("Content-type: text/html;charset=utf-8");
define("BX_ROOT", substr(dirname(__FILE__), 0, -4));
define("DS", DIRECTORY_SEPARATOR);
const DS = DIRECTORY_SEPARATOR;
require_once BX_ROOT . "core/lib/Load.php";
spl_autoload_register(["\\core\\lib\\Load", "autoload"]);
require_once BX_ROOT . "core/function.inc.php";
require_once BX_ROOT . "core/version.php";
if (!get_magic_quotes_gpc()) {
if (!ini_get("magic_quotes_gpc")) {
if (!empty($_GET)) {
$_GET = addslashes_deep($_GET);
}
Expand All @@ -28,7 +30,7 @@
}
Route::init();
Route::load();
//HTTP API

function curl_get_contents($url, $timeout = 2){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
Expand All @@ -37,5 +39,4 @@ function curl_get_contents($url, $timeout = 2){
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
?>
}

0 comments on commit beb70b5

Please sign in to comment.