PHP | output_add_rewrite_var() Function
The output_add_rewrite_var() function is an inbuilt function in PHP which is used as output control functions to add values of URL rewritter. This function adds another name or value pair to the URL rewrite mechanism. The name and value will be added to URLs (as GET parameter) and forms (as hidden input fields) the same way as transparent URL rewriting is enabled with session.use_trans_sid instead of session ID. The behaviour of this function is controlled by url_rewriter.tags and url_rewriter.hosts php.ini parameters. In further version dedicated output buffer is used, url_rewriter.tags is used solely for output functions, url_rewriter.hosts is added. Note: Calling output_add_rewrite_var() function start output buffering implicitly even if it is not active already. Syntax:
bool output_add_rewrite_var( string $name, string $value )
- $name: It holds the variable name in string format.
- $value: It holds the value of variable in string format.
Return Value: This function returns TRUE on success and FALSE on failure. Below programs illustrate the output_add_rewrite_var() function in PHP: Program 1:
Output: Program 2:
Output: Reference: https://www.php.net/manual/en/function.output-add-rewrite-var.php
Please Login to comment...