Home > Common Problem > body text

What are the methods of response object?

青灯夜游
Release: 2020-11-30 16:46:05
Original
10733 people have browsed it

The methods of the response object include: AddHeader method, AppendToLog method, BinaryWrite method, Clear method, End method, Flush method, Redirect method, and Write method.

What are the methods of response object?

The Response object is an object used to dynamically respond to client requests, control the information sent to the user, and dynamically generate a response. The Response object only provides a data collection cookie, which is used to write cookie values ​​on the client side. If the specified cookie does not exist, create it. If present, it will be updated automatically. The results are returned to the client browser.

The Response object is used to dynamically respond to client requests and return dynamically generated response results to the client browser. Use the Response object to send information directly to the browser, redirect the browser to another URL or set the value of a cookie, etc.

Methods of the response object:

  • AddHeader: Adds new HTTP headers and values ​​to the HTTP response.

  • AppendToLog: Appends a string to the end of the server log entry.

  • BinaryWrite: Write data directly to the output without any character conversion.

  • Clear: Clear buffered HTML output.

  • #End: Stop processing the script and return the current result.

  • #Flush: Send buffered HTML output immediately.

  • #Redirect: Redirect the user to a different URL.

  • #Write: Write the specified string to the output.

For more programming-related knowledge, please visit: Programming Teaching! !

The above is the detailed content of What are the methods of response object?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!