I have an image that's only 100K in size, and I am working with 8mb of memory. If I do this:
print_r(ceil((int)ini_get('memory_limit') * 10 * filesize(actual_path("$locationPath/$this->fileName")) / 1000000) . 'M'); // PRINTS OUT "2M" for 2mb
The image itself requires far less than the maximum amount of memory required.
However, the moment I do this:
$imagestring = @file_get_contents(actual_path(realpath("$locationPath/" . $this->{$section . '_name'})));
It locks up and forces a download of "index.php" (which indicates to me that the memory allotment of 8mb has been used up).
How in the world can a 100KB image that uses only 2mb of 8mb use up 8mb of memory on file_get_contents() alone? I'm completely confused!
Thanx
Phil