How to add content to an http request?
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.
精彩评论