I am having issues with including really large files and so have used ini_set('memory_limit', '-1');
but still cannot include a file that is just over 1GB. What should I do?
I am having issues with including really large files and so have used ini_set(‘memory_limit’,
Share
You will have to reconsider your architecture; PHP’s include function was not designed to handle such large files; it was designed to include and evaluate a PHP code file. Without knowing what data the file actually holds, it’s hard to say more; but it seems very unlikely that this file actually only holds PHP code; it sounds like you’re trying to read a lot of information which is encoded in a PHP-like format.
You should e.g. try to read the file in chunks or lines instead of using include.