ThinkPHP3.0 runtime file branch operation_PHP tutorial

WBOY
Release: 2016-07-14 10:10:42
Original
975 people have browsed it

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...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!