Thread: HTTPd
View Single Post
Old 02-06-2004, 05:16 AM  
darkone
Disabled
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

One of the important additions to php command set is:

Code:
<? php
	header('Content-type: text/plain');
	header('Content-Disposition: attachment; filename="ioFTPD-beta5-6-3u.zip"');
	io_attachment('d:\\ioFTPD-beta5-6-3u.zip');
?>

io_attachment() does same as readfile(), but has much better performance. io_attachment() tells ioftpd to read file outside the php interpreter.

Following is also possible:
Code:
<? php
	io_attachment('d:\\ioFTPD-beta5-6-3u.zip');
	echo "foo";
	io_attachment('d:\\ioFTPD-beta5-6-3u.zip');
	echo "foo";
?>
darkone is offline   Reply With Quote