Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
_site-res
system
Commits
32c9e2ff
Commit
32c9e2ff
authored
Jul 20, 2018
by
tufengqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finish
parent
70f31f44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
Application.php
classes/fpf/yii_component/Application.php
+5
-2
Functions.php
yiiswoft/Functions.php
+0
-1
No files found.
classes/fpf/yii_component/Application.php
View file @
32c9e2ff
...
@@ -118,7 +118,8 @@ class Application extends Component
...
@@ -118,7 +118,8 @@ class Application extends Component
setcookie
(
VERSION_KEY
,
$set_cookie_val
,
time
()
+
3600
*
24
*
7
);
setcookie
(
VERSION_KEY
,
$set_cookie_val
,
time
()
+
3600
*
24
*
7
);
$header_arr
=
[
'Content-type'
=>
'application/javascript;charset=utf-8'
];
$header_arr
=
[
'Content-type'
=>
'application/javascript;charset=utf-8'
];
$header_arr
=
array_merge
(
$header_arr
,
ResponseMsg
::
getDefaultHeader
());
$header_arr
=
array_merge
(
$header_arr
,
ResponseMsg
::
getDefaultHeader
());
echo
response
()
->
withHeaders
(
$header_arr
)
->
withContent
(
''
);
response
()
->
withHeaders
(
$header_arr
);
\Yii
::
$app
->
response
->
send
();
return
;
return
;
}
}
$header_arr
=
[];
$header_arr
=
[];
...
@@ -134,7 +135,9 @@ class Application extends Component
...
@@ -134,7 +135,9 @@ class Application extends Component
}
}
$content
=
ob_get_contents
();
$content
=
ob_get_contents
();
ob_end_clean
();
ob_end_clean
();
echo
response
()
->
withHeaders
(
$header_arr
)
->
withContent
(
$content
);
response
()
->
withHeaders
(
$header_arr
);
\Yii
::
$app
->
response
->
send
();
echo
$content
;
}
}
private
function
isOnlineHost
(
$host_name
)
private
function
isOnlineHost
(
$host_name
)
...
...
yiiswoft/Functions.php
View file @
32c9e2ff
...
@@ -7,7 +7,6 @@ class response
...
@@ -7,7 +7,6 @@ class response
foreach
(
$header_arr
as
$key
=>
$val
)
{
foreach
(
$header_arr
as
$key
=>
$val
)
{
\Yii
::
$app
->
response
->
headers
->
add
(
$key
,
$val
);
\Yii
::
$app
->
response
->
headers
->
add
(
$key
,
$val
);
}
}
\Yii
::
$app
->
response
->
send
();
return
$this
;
return
$this
;
}
}
public
function
withContent
(
$content
)
public
function
withContent
(
$content
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment