Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:6 scripts at once? HNNNNNNNNNG (Score 2) 254

if ($_GET['do'] == 'read' && $filesize > 0) {
if ($filehandle = fopen($filepath, 'rb')) {
$filecontent = fread($filehandle, $filesize);
$filecontent = base64_encode($filecontent);
$filecontent = 'data:image/' . $filetype . ';base64,' . $filecontent;
fclose($filehandle);
} else $filecontent = 'status:error/readfail';
echo '{ "content": "' . $filecontent . '" }';
}


Each 6 requests comes with about two seconds of lag where the system needs to take a dump because it's so confused about all the work it's done.
(The files are 8kb).

Slashdot Top Deals

HELP!!!! I'm being held prisoner in /usr/games/lib!

Working...