in reply to Displaying carriage returns
To display as plaintext:
To use whatever method the browser defaults to for xml:print header('text/plain');
Personally I find the CGI header options limiting and tend to print them manually, e.g.:print header('text/xml');
Note that the initial output is treated as headers that define what is to come, which is terminated by two '\n'.print "Content-type: text/xml\n"; print "Content-Disposition: inline; filename=directory.xml\n\n";
The reason for including the Content-Disposition header in this case is to provide an extra hint to browsers that care about file extensions, like IE.
|
|---|