ThinkPHP prompts Fatalerror: Allowedmemorysize solution, thinkphpfatal. ThinkPHP prompts Fatalerror: Allowedmemorysize. thinkphpfatal this article describes how ThinkPHP prompts Fatalerror: Allowedmemorysize. If ThinkPHP prompts the error Fatal error: Allowed memory size, thinkphpfatal
This article describes how ThinkPHP prompts the error Fatal error: Allowed memory size. Share it with you for your reference. The specific analysis is as follows:
If your ThinkPHP prompts you a Fatal error (Fatal error: Allowed memory size), I don't think it is a good solution to increase the memory available for servers. There is no need for trouble. This is because ThinkPHP has a BUG.
Error message:Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 523800 bytes) in/var/www/www.example.com/ThinkPHP/Lib/Template/ThinkTemplate.class.php on line 265.
If your error message is the same as mine, tell you ThinkTemplate. class. an error occurs in the php file, that is, it has an endless loop when parsing its own tag include or other tags, resulting in insufficient server memory for this endless loop.
Solution:
1. locate the problem source. On the template page with the error (Fatal error: Allowed memory size), find the ThinkPHP tag you are using (include/if/empty) and delete the tests one by one, check which tag is causing the problem;
2. replace the tag you are using with the native PHP, for example:
The code is as follows:
Include './Public/home/js/Company/companyJS.html ';
For empty reason, refer to the above:
The code is as follows:
If (empty ($ )){
Echo 'A is blank'
}
Now the problem is solved!
I hope this article will help you with ThinkPHP framework-based programming.
Fatal error: Allowed memory size solution. thinkphpfatal this article describes how ThinkPHP prompts the error Fatal error: Allowed memory size. Share...