[英]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 world!",$response);
How to add a custom html above the <html>
right there? 如何在
<html>
上方添加自定义html? I want a solution based on the blank line gap! 我想要一个基于空白行的解决方案!
Thanks 谢谢
In zend framework there is some something like that 在zend框架中有一些类似的东西
$this->getResponse()
->appendBody("Hello World\n")
I wonder why you have Hello World 2 times. 我不知道你为什么有2次Hello World。 With addhtml you want to add custom text to response or append.
使用addhtml,您想添加自定义文本以响应或追加。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.