Hi,
I have a XML file and want to put this line it but doesn't work. Is there any way of doing it?
Thanks
<?php
header('location: goback.php');
exit;
?>
If the file is not named with a .php extension then the server will not know to process the PHP code in it, so unfortunately you can't do it that way.
rename your .XML file to .PHP for the code to run
You want to redirect to xml page, what is goback.php?
If you want to redirect to xml file i.e. myfile.xml then,header("location:myfile.xml");
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.