Weirdness killing script
Posted: Fri Nov 12, 2004 2:57 am
Hi,
I have a wierdness that is baffling me.
$filename is a 600k jpeg file.
Now executing the above does nothing, zip, nada. It should just print the words Before and After, but what appears to be happening is the script just dies and nothing is printed, if I place exit after the first print, then the script actually runs and just prints Before.
I have seen this before with some other code, that I am just using readfile() or passthru() of various file formats and sizes. I just put it down to the files being corrupted during uploading, but this doesn't actually seem to be the case?
Very confused.
I have a wierdness that is baffling me.
Code: Select all
<?php
print "Before";
$img = imagecreatefromjpeg ( $filename );
print "After";
?>Now executing the above does nothing, zip, nada. It should just print the words Before and After, but what appears to be happening is the script just dies and nothing is printed, if I place exit after the first print, then the script actually runs and just prints Before.
I have seen this before with some other code, that I am just using readfile() or passthru() of various file formats and sizes. I just put it down to the files being corrupted during uploading, but this doesn't actually seem to be the case?
Very confused.