同步操作将从 黔狐科技/FoxCMS黔狐内容管理系统 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php// [ 应用入口文件 ]namespace think;if(version_compare(PHP_VERSION,'7.1','<') || version_compare(PHP_VERSION,'8.0','>=')) {$vinfo = require_once('./data/update/version/info.php');$pve = require_once('./static/warn/php_version_error.html');echo $pve;exit();}define('INSTALL_PATH', str_replace('\\', '/', dirname(__FILE__)));//安装路径if (file_exists(INSTALL_PATH."/install/") && !is_file(INSTALL_PATH . '/install/install.lock')) {//没有安装header('Location:/install/index.php');exit();}$base = require('./config/cfg/base.php');try {require __DIR__ . '/vendor/autoload.php';} catch (\Throwable $e) {if($base['frame_exception'] == '0'){$pve = require_once('./static/warn/php_version_error.html');echo $pve;exit();}}//检查$seo = require('./config/cfg/seo.php');if($seo['pseudo_status'] == 1){$serverSoftware = strtolower($_SERVER['SERVER_SOFTWARE']);if (strpos($serverSoftware, 'apache') !== false) {$wFile = __DIR__."/.htaccess";$contet = '<IfModule mod_rewrite.c>Options +FollowSymlinks -MultiviewsRewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php [L,E=PATH_INFO:1ドル]</IfModule>';config($contet, $wFile);} elseif (strpos($serverSoftware, 'nginx') !== false) {} elseif (strpos($serverSoftware, 'iis') !== false) {$wFile = __DIR__."/web.config";$contet = '<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><rewrite><rules><rule name="WPurls" enabled="true" stopProcessing="true"><match url=".*" /><conditions logicalGrouping="MatchAll"><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /></conditions><action type="Rewrite" url="index.php/{R:0}" /></rule></rules></rewrite></system.webServer></configuration>';config($contet, $wFile);}}if($_SERVER['REQUEST_URI'] == "/"){if($_SERVER["SERVER_PORT"] == 80){$domain = $_SERVER["SERVER_NAME"];}else{$domain = $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"];}$prefixURL = 'http';if ($_SERVER["HTTPS"] == "on"){$prefixURL .= "s";}$url = "{$prefixURL}://{$domain}/plus/Access/check";$ch = curl_init();$timeout = 1; // 设置超时的时间[单位:秒]curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_HEADER, 1);curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);curl_setopt($ch, CURLOPT_URL, $url);curl_exec($ch);# 获取状态码赋值$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);curl_close($ch);if (!($httpcode == 200)) {header('Location:index.php');die("访问失败");}}// 执行HTTP应用并响应$http = (new App())->http;define("RUNTIME", __DIR__);if(isApply()){$response = $http->run();}else{if($base["status"] == 0){$vinfo = require_once('./data/update/version/info.php');setcookie("status_desc", $base["status_desc"]);setcookie("version", $vinfo['version']);require_once('./static/warn/close.php');exit();}$response = $http->name('home')->run();}$response->send();$http->end($response);/*** 判断应用* @return bool*/function isApply(){$uri = $_SERVER["REQUEST_URI"];$adminconfig = require('./config/adminconfig.php');$applys = require('./config/cfg/apply.php');$isApply = false;$uriArr = explode("/", $uri);if(str_starts_with($uri, "/index.php")){$app_name = $uriArr[2];}else{$app_name = $uriArr[1];}if($adminconfig["admin_path"] == $app_name){$isApply = true;}if(!$isApply){foreach ($applys as $apply){if($apply == $app_name){$isApply = true;break;}}}return $isApply;}/*** 配置伪静态*/function config($content, $file){if(file_exists($file)){$dh = file_get_contents($file);if (empty($dh)){file_put_contents($file,$content);}}else{file_put_contents($file,$content);}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。