[PHP] dir size

2003-10-03 Thread Ms Carlsson
is it possible to count  a size of a dir and all sub dirs in php ? and if, 
how?

thanx

_
Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Dwonload with PHP do not work..

2003-09-28 Thread Ms Carlsson
$file = /home//openssh-3.6.1p1.tar.gz;
$mb = filesize($file);
$download = openssh-3.6.1p1.tar.gz;
$fp = fopen($file, r);

 Header ( HTTP/1.1 206 One resume, coming up! );
 Header ( Pragma: no-cache );
 Header ( Content-Type: application/octet-stream );
 Header ( Content-Length: .filesize($file) );
 Header ( Content-Disposition: attachment; filename=$download )$
 readfile(/home//openssh-3.6.1p1.tar.gz);
 exit;


THis start a download but give me a corrupted downloaded file...
Any help out here..
_
Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] $php_as_cgi == error;

2003-09-28 Thread Ms Carlsson
Hello this does not work with apache + suexec and php running like cgi

#!/usr/local/bin/php

# in top of all php scripts
?
   header(Content-Disposition: attachment; filename=$filename);
   header(Content-Type: application/octet-stream);
   header(Content-Length: .filesize($path/$filename));
 header(Pragma: no-cache);
 header(Expires: 0);
   $fp=fopen($path/$filename,r);
   print fread($fp, filesize($path/$filename));
   fclose($fp);
   exit();
?

the file downloads but when open i get an error but when i try the same 
script on a machine with apache + php as a built in module it works, why 
does this ot work when access the script as cgi with apache + suxex ??

_
Hitta rätt på nätet med MSN Sök http://search.msn.se/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php