To geneate a file on windows from prompt
C:\Documents and Settings>fsutil file createnew testfile 1024000
To geneate a file on windows from prompt
C:\Documents and Settings>fsutil file createnew testfile 1024000
Read by lines
$hd = fopen(“$file”, “r”);
if($hd){
while(!feof($hd)){
$line = fgets($hd);
}
}
fclose($hd);
Read the whole file in
$contents = fread($hd, filesize($file));
}
fclose($hd);
Read image in binary
echo “couldn’t open $img_path”;
die;
}
while (!feof($img)) {
$contents .= fread($img, 1024);
}
fclose($img);
###Header for image
header(“Cache-Control: public”);
if(eregi(“\.[jpg|jpeg]”,$file)){
header (“Content-type: image/jpg”);
header(“Content-Disposition: inline; filename=$file”);
#header(‘Content-Length: ‘ . filesize($img));
print $contents;
}