提交 65c637b2 编写于 作者: D devil_gong

主题虚拟机下地址错误

上级 67beecb9
......@@ -59,7 +59,7 @@ return [
'imageUrlPrefix' => '',
// 上传保存路径,可以自定义保存路径和文件名格式
'imagePathFormat' => __MY_ROOT__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
'imagePathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
// 涂鸦图片上传配置项
......@@ -70,7 +70,7 @@ return [
'scrawlFieldName' => 'upfile',
// 上传保存路径,可以自定义保存路径和文件名格式
'scrawlPathFormat' => __MY_ROOT__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
'scrawlPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
// 上传大小限制,单位B
'scrawlMaxSize' => MyC('home_max_limit_image', 2048000, true),
......@@ -87,7 +87,7 @@ return [
'snapscreenActionName' => 'uploadimage',
// 上传保存路径,可以自定义保存路径和文件名格式
'snapscreenPathFormat' => __MY_ROOT__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
'snapscreenPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
// 图片访问路径前缀
'snapscreenUrlPrefix' => '',
......@@ -107,7 +107,7 @@ return [
'catcherFieldName' => 'source',
// 上传保存路径,可以自定义保存路径和文件名格式
'catcherPathFormat' => __MY_ROOT__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
'catcherPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
// 图片访问路径前缀
'catcherUrlPrefix' => '',
......@@ -127,7 +127,7 @@ return [
'videoFieldName' => 'upfile',
// 上传保存路径,可以自定义保存路径和文件名格式
'videoPathFormat' => __MY_ROOT__.'static/upload/video/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
'videoPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/video/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
// 视频访问路径前缀
'videoUrlPrefix' => '',
......@@ -147,7 +147,7 @@ return [
'fileFieldName' => 'upfile',
// 上传保存路径,可以自定义保存路径和文件名格式
'filePathFormat' => __MY_ROOT__.'static/upload/file/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
'filePathFormat' => __MY_ROOT_PUBLIC__.'static/upload/file/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
// 文件访问路径前缀
'fileUrlPrefix' => '',
......@@ -164,7 +164,7 @@ return [
'imageManagerActionName'=> 'listimage',
// 指定要列出图片的目录
'imageManagerListPath' => __MY_ROOT__.'static/upload/images/'.input('path_type', 'other').'/',
'imageManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/images/'.input('path_type', 'other').'/',
// 每次列出文件数量
'imageManagerListSize' => 20,
......@@ -184,7 +184,7 @@ return [
'fileManagerActionName' => 'listfile',
// 指定要列出文件的目录
'fileManagerListPath' => __MY_ROOT__.'static/upload/file/'.input('path_type', 'other').'/',
'fileManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/file/'.input('path_type', 'other').'/',
// 文件访问路径前缀
'fileManagerUrlPrefix' => '',
......@@ -199,7 +199,7 @@ return [
'videoManagerActionName' => 'listvideo',
// 指定要列出文件的目录
'videoManagerListPath' => __MY_ROOT__.'static/upload/video/'.input('path_type', 'other').'/',
'videoManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/video/'.input('path_type', 'other').'/',
// 文件访问路径前缀
'videoManagerUrlPrefix' => '',
......
......@@ -75,7 +75,7 @@ class Common extends Controller
ConfigService::ConfigInit();
// url模式,后端采用兼容模式
\think\facade\Url::root(__MY_ROOT__.'index.php?s=');
\think\facade\Url::root(__MY_ROOT_PUBLIC__.'index.php?s=');
}
/**
......
......@@ -130,7 +130,7 @@ class Ueditor extends Common
$path = input('path');
if(!empty($path))
{
$path = (__MY_ROOT__ == '/') ? substr(ROOT_PATH, 0, -1).$path : str_replace(__MY_ROOT__, ROOT_PATH, $path);
$path = (__MY_ROOT_PUBLIC__ == '/') ? substr(ROOT_PATH, 0, -1).$path : str_replace(__MY_ROOT_PUBLIC__, ROOT_PATH, $path);
if(file_exists($path))
{
if(is_writable($path))
......
......@@ -6,29 +6,29 @@
</html>
<!-- 类库 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/jquery/jquery-2.1.0.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/assets/js/amazeui.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/echarts/echarts.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/jquery/jquery-2.1.0.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/js/amazeui.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/echarts/echarts.min.js"></script>
<!-- ueditor 编辑器 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/ueditor.config.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/ueditor.all.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/ueditor.config.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/ueditor.all.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/lang/zh-cn/zh-cn.js"></script>
<!-- 颜色选择器 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/colorpicker/jquery.colorpicker.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/colorpicker/jquery.colorpicker.js"></script>
<!-- 元素拖拽排序插件 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/dragsort/jquery.dragsort-0.5.2.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/dragsort/jquery.dragsort-0.5.2.min.js"></script>
<!-- amazeui插件 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-switch/amazeui.switch.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-chosen/amazeui.chosen.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-dialog/amazeui.dialog.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-tagsinput/amazeui.tagsinput.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-switch/amazeui.switch.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-chosen/amazeui.chosen.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-dialog/amazeui.dialog.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-tagsinput/amazeui.tagsinput.min.js"></script>
<!-- 日期组件 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/My97DatePicker/WdatePicker.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/My97DatePicker/WdatePicker.js"></script>
<!-- 隐藏编辑器初始化 -->
<script type="text/javascript">
......@@ -46,9 +46,9 @@
</script>
<!-- 项目公共 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/js/common.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/js/common.js"></script>
<!-- 控制器 -->
{{if !empty($module_js)}}
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/{{$module_js}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_js}}"></script>
{{/if}}
\ No newline at end of file
......@@ -5,15 +5,15 @@
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1" />
<title>ShopXO后台管理系统</title>
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/assets/css/amazeui.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-switch/amazeui.switch.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-chosen/amazeui.chosen.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-tagsinput/amazeui.tagsinput.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/css/common.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/admin/{{$default_theme}}/css/common.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/admin/{{$default_theme}}/css/iconfontmenu.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/css/amazeui.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-switch/amazeui.switch.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-chosen/amazeui.chosen.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-tagsinput/amazeui.tagsinput.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/css/common.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/admin/{{$default_theme}}/css/common.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/admin/{{$default_theme}}/css/iconfontmenu.css" />
{{if !empty($module_css)}}
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/{{$module_css}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_css}}" />
{{/if}}
</head>
<script type="text/javascript">
......
......@@ -76,7 +76,7 @@ class Common extends Controller
ConfigService::ConfigInit();
// url模式,后端采用兼容模式
\think\facade\Url::root(__MY_ROOT__.'index.php?s=');
\think\facade\Url::root(__MY_ROOT_PUBLIC__.'index.php?s=');
}
/**
......
......@@ -82,7 +82,7 @@ class Common extends Controller
// url模式
if(MyC('home_seo_url_model', 0) == 0)
{
\think\facade\Url::root(__MY_ROOT__.'index.php?s=');
\think\facade\Url::root(__MY_ROOT_PUBLIC__.'index.php?s=');
}
}
......
......@@ -12,36 +12,36 @@
</html>
<!-- 类库 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/jquery/jquery-2.1.0.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/assets/js/amazeui.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/echarts/echarts.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/imagezoom/jquery.imagezoom.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/jquery/jquery-2.1.0.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/js/amazeui.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/echarts/echarts.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/imagezoom/jquery.imagezoom.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<!-- amazeui插件 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-switch/amazeui.switch.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-chosen/amazeui.chosen.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-dialog/amazeui.dialog.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-switch/amazeui.switch.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-chosen/amazeui.chosen.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-dialog/amazeui.dialog.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<!-- 图像裁剪插件 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/cropper/cropper.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/cropper/cropper.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<!-- ueditor 编辑器 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/ueditor.config.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/ueditor.all.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/lang/zh-cn/zh-cn.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/ueditor.config.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/ueditor.all.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/lang/zh-cn/zh-cn.js?v={{:MyC('home_static_cache_version')}}"></script>
<!-- 颜色选择器 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/colorpicker/jquery.colorpicker.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/colorpicker/jquery.colorpicker.js?v={{:MyC('home_static_cache_version')}}"></script>
<!-- 日期组件 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/My97DatePicker/WdatePicker.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/My97DatePicker/WdatePicker.js"></script>
<!-- 项目公共 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/index/{{$default_theme}}/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/index/{{$default_theme}}/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>
<!-- 控制器 -->
{{if !empty($module_js)}}
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/{{$module_js}}?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_js}}?v={{:MyC('home_static_cache_version')}}"></script>
{{/if}}
{{:MyC('home_footer_info')}}
\ No newline at end of file
......@@ -17,20 +17,20 @@
<link rel="apple-touch-icon" href="{{$images_host}}{{:MyC('home_site_desktop_icon')}}">
<link rel="apple-touch-icon-precomposed" href="{{$images_host}}{{:MyC('home_site_desktop_icon')}}">
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/assets/css/amazeui.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-switch/amazeui.switch.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-chosen/amazeui.chosen.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/cropper/cropper.min.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/css/amazeui.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-switch/amazeui.switch.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-chosen/amazeui.chosen.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/cropper/cropper.min.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/css/common.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/index/{{$default_theme}}/css/common.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/css/common.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/index/{{$default_theme}}/css/common.css?v={{:MyC('home_static_cache_version')}}" />
{{if !empty($module_css)}}
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/{{$module_css}}?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_css}}?v={{:MyC('home_static_cache_version')}}" />
{{/if}}
<script type="text/javascript">
var __root__ = '{{$Think.__MY_ROOT__}}';
var __root__ = '{{$Think.__MY_ROOT_PUBLIC__}}';
var __my_url__ = '{{:__MY_URL__}}';
var __public__ = '{{$Think.__MY_ROOT__}}';
var __public__ = '{{$Think.__MY_ROOT_PUBLIC__}}';
var __default_theme__ = '{{$default_theme}}';
var __modal_login_url__ = '{{:Url("index/user/modallogininfo")}}';
var __images_host__ = '{{$images_host}}';
......
......@@ -35,7 +35,7 @@ class Common extends Controller
parent::__construct();
// url模式
\think\facade\Url::root(__MY_ROOT__.'index.php?s=');
\think\facade\Url::root(__MY_ROOT_PUBLIC__.'index.php?s=');
// 当前方法
$this->assign('action', strtolower(request()->action()));
......
......@@ -6,7 +6,7 @@
</html>
<!-- 类库 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/jquery/jquery-2.1.0.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/assets/js/amazeui.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/js/common.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/install/js/index.js"></script>
\ No newline at end of file
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/jquery/jquery-2.1.0.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/js/amazeui.min.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/js/common.js"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/install/js/index.js"></script>
\ No newline at end of file
......@@ -12,11 +12,11 @@
<link rel="shortcut icon" type="image/x-icon" href="{{:__MY_URL__}}favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/assets/css/amazeui.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-switch/amazeui.switch.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-chosen/amazeui.chosen.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/cropper/cropper.min.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/css/amazeui.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-switch/amazeui.switch.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-chosen/amazeui.chosen.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/cropper/cropper.min.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/css/common.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/install/css/index.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/css/common.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/install/css/index.css" />
<body>
\ No newline at end of file
......@@ -42,7 +42,7 @@ class ResourcesService
// 内容写入
case 'add':
return str_replace(array(__MY_PUBLIC_URL__.'static/', __MY_ROOT__.'static/'), '/static/', $content);
return str_replace(array(__MY_PUBLIC_URL__.'static/', __MY_ROOT_PUBLIC__.'static/'), '/static/', $content);
}
return $content;
}
......@@ -58,7 +58,7 @@ class ResourcesService
*/
public static function AttachmentPathHandle($value)
{
return empty($value) ? '' : str_replace([__MY_PUBLIC_URL__, __MY_ROOT__], DS, $value);
return empty($value) ? '' : str_replace([__MY_PUBLIC_URL__, __MY_ROOT_PUBLIC__], DS, $value);
}
/**
......
......@@ -42,9 +42,14 @@ class ThemeService
{
if($dh = opendir($dir))
{
$default_preview = __MY_URL__.'static'.DS.'common'.DS.'images'.DS.'default-preview.jpg';
$default_preview = __MY_PUBLIC_URL__.'static'.DS.'common'.DS.'images'.DS.'default-preview.jpg';
while(($temp_file = readdir($dh)) !== false)
{
if(in_array($temp_file, ['.', '..', 'index.html']))
{
continue;
}
$config = $dir.$temp_file.DS.'config.json';
if(!file_exists($config))
{
......@@ -66,7 +71,7 @@ class ThemeService
'ver' => str_replace(array(',',','), ', ', htmlentities($data['ver'])),
'author' => htmlentities($data['author']),
'home' => isset($data['home']) ? $data['home'] : '',
'preview' => file_exists($preview) ? __MY_URL__.'static'.DS.'index'.DS.$temp_file.DS.'images'.DS.'preview.jpg' : $default_preview,
'preview' => file_exists($preview) ? __MY_PUBLIC_URL__.'static'.DS.'index'.DS.$temp_file.DS.'images'.DS.'preview.jpg' : $default_preview,
'is_delete' => ($temp_file == 'default') ? 0 : 1,
);
}
......
......@@ -9,39 +9,39 @@
// | Author: Devil
// +----------------------------------------------------------------------
// 检测PHP环境
if(version_compare(PHP_VERSION,'5.6.0','<')) die('PHP版本最低 5.6.0');
// 开启缓冲区
ob_start();
// 检测PHP环境
if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !');
// 系统版本
define('APPLICATION_VERSION', 'v1.2.0');
// 定义系统目录分隔符
define('DS', '/');
// HTTP类型
define('__MY_HTTP__', (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') ? 'http' : 'https');
// 根目录
$my_root = empty($_SERVER['SCRIPT_NAME']) ? '' : substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')+1);
define('__MY_ROOT__', defined('IS_ROOT_ACCESS') ? $my_root.'public/' : $my_root);
$my_root = empty($_SERVER['SCRIPT_NAME']) ? '' : substr($_SERVER['SCRIPT_NAME'], 1, strrpos($_SERVER['SCRIPT_NAME'], '/'));
define('__MY_ROOT__', defined('IS_ROOT_ACCESS') ? $my_root : str_replace('public'.DS, '', $my_root));
define('__MY_ROOT_PUBLIC__', defined('IS_ROOT_ACCESS') ? DS.$my_root.'public'.DS : DS.$my_root);
// 项目HOST
define('__MY_HOST__', empty($_SERVER['HTTP_HOST']) ? '' : $_SERVER['HTTP_HOST']);
// 项目URL地址
define('__MY_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.'://'.__MY_HOST__.$my_root);
define('__MY_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.'://'.__MY_HOST__.DS.$my_root);
// 项目public目录URL地址
define('__MY_PUBLIC_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.'://'.__MY_HOST__.__MY_ROOT__);
define('__MY_PUBLIC_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.'://'.__MY_HOST__.__MY_ROOT_PUBLIC__);
// 当前页面url地址
$request_url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
define('__MY_VIEW_URL__', substr(__MY_URL__, 0, -1).$request_url);
// 系统版本
define('APPLICATION_VERSION', 'v1.2.0');
// 定义系统目录分隔符
define('DS', '/');
// 系统根目录
define('ROOT_PATH', dirname(__FILE__).DS);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册