开发者

How to add content to an http request?

开发者 https://www.devze.com 2023-01-14 15:48 出处:网络
I have the following: $request=\"HTTP/1.0 200 OK Date: Sat, 04 Sep 2010 00:37:36 GMT Expires: -1 Cache-Control: private, max-age=0

I have the following:

$request="HTTP/1.0 200 OK
Date: Sat, 04 Sep 2010 00:37:36 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=UTF-8
Server: gws
X-XSS-Protection: 1; mode=block
X-Cache: MISS from proxy.rstel.net
X-Cache-Lookup: MISS from proxy.rstel.net:3128
Via: 1.0 proxy.rstel.net (squid/3.0.STABLE15)
Proxy-Connection: close

<html>
<body>
Blah Blah Blah
</body>
</html>"

$response=addhtml("Hello w开发者_运维问答orld!",$response);

How to add a custom html above the <html> right there? I want a solution based on the blank line gap!

Thanks


In zend framework there is some something like that

$this->getResponse()
             ->appendBody("Hello World\n")

I wonder why you have Hello World 2 times. With addhtml you want to add custom text to response or append.

0

精彩评论

暂无评论...
验证码 换一张
取 消