fopen ; fstat PHP ver.4.0.6

From: Date: Sun, 18 Nov 2001 16:01:48 +0000
Subject: fopen ; fstat PHP ver.4.0.6
Groups: php.windows 
Request: Send a blank email to php-windows+get-10474@lists.php.net to get a copy of this message
Hi everybody!! Does anybody know how to use fopen and fstat! I used it on local files and refered files on the own server, but it doesn't show (e.g. the filesize) of my server with the downloadfiles, which is not the same server the php files are on! I've also added the source code, so please help me if you can!! Thanx!! Mister16 <?php $file = fopen ("http://www.ganymede.spaceports.com/~mister16/2inseln.exe", "r"); echo "Datei geladen!!<br>"; $t=fstat($file); echo "Array über Funktion zugewiesen<br>"; print $t["size"]; echo "Info ausgegeben!<br>"; fclose ($file); echo "Datei geschlossen!<br>"; /*if ($t >= 1000000) { $t = $t / 1000000; $t = round($t,3); echo "$t MB"; } elseif ($t >= 1000) { $t = $t / 1000; $t = round($t,3); echo "$t KB"; } else { $t = round($t,3); echo "$t Byte(s)"; };*/ ?>

« previous php.windows (#10474) next »