VOOZH about

URL: https://www.geeksforgeeks.org/php/php-xmlwriter-openuri-function/

⇱ PHP | XMLWriter openUri() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

PHP | XMLWriter openUri() Function

Last Updated : 7 Mar, 2024
The XMLWriter::openUri() function is an inbuilt function in PHP which is used to create a new XMLWriter using source URI for output. In simple words, this function decides how to output the XML to user, it can be through a browser or directly to a file. Syntax:
bool XMLWriter::openUri( string $uri )
Parameters:This function accepts a single parameter $uri which holds the uri for output. Return Value: This function returns TRUE on success or FALSE on failure. Below examples illustrate the XMLWriter::openUri() function in PHP: Example 1: Output:
GeeksforGeeks
Example 2: Output: This will create a new file called new.xml in the same folder with the following content 👁 Image
Comment
Article Tags: