jan99844 Posted November 18, 2012 Share Posted November 18, 2012 Hi, My first script generates .jpg images and saves them in some catalog on my server. The second script should read .jpg file and send it as an output to browser. Here is it: <?php header('Content-type: image/jpg'); $i = $_GET['i']; $uid = $_GET['uid']; if (file_exists("graph/$uid/p$i.jpg")){ readfile("graph/$uid/p$i.jpg"); } else { readfile("empty.jpg") ; } ?> Everything works just fine besides the time which takes to output images. Let's say when the first script save image in the catalogue, the second script has to be run few times (around 15 seconds) to display correct image. Do anyone know where is the problem ? Link to comment https://forums.phpfreaks.com/topic/270877-readfile-function-takes-too-long/ Share on other sites More sharing options...
Christian F. Posted November 20, 2012 Share Posted November 20, 2012 That implies that it is the graph generation that takes ~15 seconds, if this second script keeps showing "empty.jpg" in the meantime. Link to comment https://forums.phpfreaks.com/topic/270877-readfile-function-takes-too-long/#findComment-1393701 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.