I have an image that's only 100K in size, and I am working with 8mb of
memory. If I do this:
[PHP]
print_r(ceil((i nt)ini_get('mem ory_limit') * 10 *
filesize(actual _path("$locatio nPath/$this->fileName")) / 1000000) .
'M'); // PRINTS OUT "2M" for 2mb
]/PHP]
The image itself requires far less than the maximum amount of memory
required.
However, the moment I do this:
[PHP]
$imagestring =
@file_get_conte nts(actual_path (realpath("$loc ationPath/" .
$this->{$section . '_name'})));
[/PHP]
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_conten ts() alone? I'm completely confused!
Thanx
Phil
memory. If I do this:
[PHP]
print_r(ceil((i nt)ini_get('mem ory_limit') * 10 *
filesize(actual _path("$locatio nPath/$this->fileName")) / 1000000) .
'M'); // PRINTS OUT "2M" for 2mb
]/PHP]
The image itself requires far less than the maximum amount of memory
required.
However, the moment I do this:
[PHP]
$imagestring =
@file_get_conte nts(actual_path (realpath("$loc ationPath/" .
$this->{$section . '_name'})));
[/PHP]
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_conten ts() alone? I'm completely confused!
Thanx
Phil
Comment