Difference between revisions of "Ns returnfile"

From AOLserver Wiki
Jump to navigation Jump to search
(correct mistake)
Line 1: Line 1:
 
  ns_returnfile 200 "application/zip" $filepath
 
  ns_returnfile 200 "application/zip" $filepath
 
  ns_returnfile 200 [ns_guesstype $file] $filepath
 
  ns_returnfile 200 [ns_guesstype $file] $filepath
 +
 +
ns_returnfile uses fastpath internally, so care should be taken when using it to return dynamically generated files.
  
 
For now, see [[ns_return]]
 
For now, see [[ns_return]]

Revision as of 23:53, 18 August 2008

ns_returnfile 200 "application/zip" $filepath
ns_returnfile 200 [ns_guesstype $file] $filepath

ns_returnfile uses fastpath internally, so care should be taken when using it to return dynamically generated files.

For now, see ns_return

Want to name the file?

ns_set update [ns_conn outputheaders] content-disposition "attachment; filename=1.abc"