Home  >  Article  >  Backend Development  >  ThinkPHP3.0 runtime file branch operation_PHP tutorial

ThinkPHP3.0 runtime file branch operation_PHP tutorial

WBOY
WBOYOriginal
2016-07-14 10:10:421004browse

STRIP_RUNTIME_SPACE constant was removed in tp3.0. So it's useless.


I just looked at the source code of tp and found that removing whitespace and comments in the code has become the default behavior and is beyond the control of developers.
So the only way is to modify the source code. Modification method:


The last

in the build_runtime_cache() function in ThinkPHP/Common/runtime.php


file_put_contents(RUNTIME_FILE,strip_whitespace(' //Comment out and change to:
file_put_contents(RUNTIME_FILE,'


Or start directly with the strip_whitespace() method in ThinkPHP/Common/common.php
return $content;


Remember to change it back after debugging.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477478.htmlTechArticleSTRIP_RUNTIME_SPACE constant was removed in tp3.0. So it's useless. I just looked at the source code of tp and found that removing whitespace and comments in the code has become the default behavior and is beyond the control of developers...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn