|
@@ -194,12 +194,14 @@ class TemplateController extends Controller {
|
194
|
194
|
{
|
195
|
195
|
$article_html = $request->input('article_html');
|
196
|
196
|
$note = $request->input('note');
|
197
|
|
-
|
|
197
|
+ $host_str = $request->input('host_str');
|
|
198
|
+ $host_info = parse_url($host_str);
|
|
199
|
+ $host = $host_info['host'];
|
198
|
200
|
$template = new Templates();
|
199
|
201
|
$template->note = $note;
|
200
|
202
|
$template->is_html = 1;
|
201
|
203
|
$template->article_html = $article_html;
|
202
|
|
- $template->url = 'http://'.$_SERVER['HTTP_HOST'].'/seafood/articleTemplat/template1.html';
|
|
204
|
+ $template->url = 'http://'.$host.'/seafood/articleTemplat/template1.html';
|
203
|
205
|
$res = $template->save();
|
204
|
206
|
return self::returnValue($res);
|
205
|
207
|
}
|