From 602a33ee7014e213a8602f8bddef1059f6e969f6 Mon Sep 17 00:00:00 2001 From: guosheng <gs@bronet.cn> Date: Mon, 30 Mar 2020 08:48:33 +0800 Subject: [PATCH] 修改后台入口文件 --- .idea/workspace.xml | 39 ++++++++++++++++----------------------- public/admin.php | 38 -------------------------------------- public/admininfo.php | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 61 deletions(-) delete mode 100644 public/admin.php create mode 100644 public/admininfo.php diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a11c308..e1e8868 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,7 +6,7 @@ <component name="ChangeListManager"> <list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment=""> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" /> + <change type="MOVED" beforePath="$PROJECT_DIR$/public/admin.php" afterPath="$PROJECT_DIR$/public/admininfo.php" /> </list> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="TRACKING_ENABLED" value="true" /> @@ -21,7 +21,7 @@ <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="450"> - <caret line="282" column="17" lean-forward="true" selection-start-line="282" selection-start-column="17" selection-end-line="282" selection-end-column="17" /> + <caret line="282" column="17" lean-forward="false" selection-start-line="282" selection-start-column="17" selection-end-line="282" selection-end-column="17" /> <folding> <element signature="e#535#1273#0#PHP" expanded="false" /> <element signature="e#1278#2941#0#PHP" expanded="false" /> @@ -210,9 +210,9 @@ <sorting>DEFINITION_ORDER</sorting> </component> <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> - <component name="ProjectFrameBounds"> - <option name="x" value="293" /> - <option name="y" value="48" /> + <component name="ProjectFrameBounds" extendedState="1"> + <option name="x" value="54" /> + <option name="y" value="99" /> <option name="width" value="1652" /> <option name="height" value="931" /> </component> @@ -248,15 +248,7 @@ <path> <item name="areial" type="b2602c69:ProjectViewProjectNode" /> <item name="areial" type="2a2b976b:PhpTreeStructureProvider$1" /> - <item name="application" type="2a2b976b:PhpTreeStructureProvider$1" /> - <item name="api" type="2a2b976b:PhpTreeStructureProvider$1" /> - </path> - <path> - <item name="areial" type="b2602c69:ProjectViewProjectNode" /> - <item name="areial" type="2a2b976b:PhpTreeStructureProvider$1" /> - <item name="application" type="2a2b976b:PhpTreeStructureProvider$1" /> - <item name="api" type="2a2b976b:PhpTreeStructureProvider$1" /> - <item name="controller" type="2a2b976b:PhpTreeStructureProvider$1" /> + <item name="public" type="2a2b976b:PhpTreeStructureProvider$1" /> </path> </expand> <select /> @@ -266,7 +258,7 @@ </component> <component name="PropertiesComponent"> <property name="WebServerToolWindowFactoryState" value="false" /> - <property name="last_opened_file_path" value="$PROJECT_DIR$/../fastadmin/questions" /> + <property name="last_opened_file_path" value="$PROJECT_DIR$" /> <property name="DefaultHtmlFileTemplate" value="HTML File" /> <property name="settings.editor.selected.configurable" value="preferences.keymap" /> </component> @@ -412,7 +404,8 @@ <workItem from="1584922896072" duration="645000" /> <workItem from="1585128834226" duration="698000" /> <workItem from="1585216476771" duration="4322000" /> - <workItem from="1585220935766" duration="915000" /> + <workItem from="1585220935766" duration="1086000" /> + <workItem from="1585528700995" duration="51000" /> </task> <task id="LOCAL-00001" summary="调试"> <created>1574145133364</created> @@ -439,7 +432,7 @@ <servers /> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="642427000" /> + <option name="totallyTimeSpent" value="642649000" /> </component> <component name="TodoView"> <todo-panel id="selected-file"> @@ -451,18 +444,18 @@ </todo-panel> </component> <component name="ToolWindowManager"> - <frame x="293" y="48" width="1652" height="931" extended-state="0" /> + <frame x="54" y="99" width="1652" height="931" extended-state="1" /> <layout> - <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16080402" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" /> + <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16268845" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32876712" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" /> <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> - <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> + <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> - <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.46599495" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> - <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" /> + <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.46599495" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> + <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> @@ -886,7 +879,7 @@ <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="450"> - <caret line="282" column="17" lean-forward="true" selection-start-line="282" selection-start-column="17" selection-end-line="282" selection-end-column="17" /> + <caret line="282" column="17" lean-forward="false" selection-start-line="282" selection-start-column="17" selection-end-line="282" selection-end-column="17" /> <folding> <element signature="e#535#1273#0#PHP" expanded="false" /> <element signature="e#1278#2941#0#PHP" expanded="false" /> diff --git a/public/admin.php b/public/admin.php deleted file mode 100644 index a1c1350..0000000 --- a/public/admin.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -// [ 后台入口文件 ] -// 使用此文件可以达到隐藏admin模块的效果 -// 建议将admin.php改成其它任意的文件名,同时修改config.php中的'deny_module_list',把admin模块也添加进去 -// 定义应用目录 -define('APP_PATH', __DIR__ . '/../application/'); - -// 判断是否安装FastAdmin -if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) -{ - header("location:./install.php"); - exit; -} - -// 加载框架引导文件 -require __DIR__ . '/../thinkphp/base.php'; - -// 绑定到admin模块 -\think\Route::bind('admin'); - -// 关闭路由 -\think\App::route(false); - -// 设置根url -\think\Url::root(''); - -// 执行应用 -\think\App::run()->send(); diff --git a/public/admininfo.php b/public/admininfo.php new file mode 100644 index 0000000..a1c1350 --- /dev/null +++ b/public/admininfo.php @@ -0,0 +1,38 @@ +<?php + +// +---------------------------------------------------------------------- +// | ThinkPHP [ WE CAN DO IT JUST THINK ] +// +---------------------------------------------------------------------- +// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. +// +---------------------------------------------------------------------- +// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) +// +---------------------------------------------------------------------- +// | Author: liu21st <liu21st@gmail.com> +// +---------------------------------------------------------------------- +// [ 后台入口文件 ] +// 使用此文件可以达到隐藏admin模块的效果 +// 建议将admin.php改成其它任意的文件名,同时修改config.php中的'deny_module_list',把admin模块也添加进去 +// 定义应用目录 +define('APP_PATH', __DIR__ . '/../application/'); + +// 判断是否安装FastAdmin +if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) +{ + header("location:./install.php"); + exit; +} + +// 加载框架引导文件 +require __DIR__ . '/../thinkphp/base.php'; + +// 绑定到admin模块 +\think\Route::bind('admin'); + +// 关闭路由 +\think\App::route(false); + +// 设置根url +\think\Url::root(''); + +// 执行应用 +\think\App::run()->send(); -- libgit2 0.24.0