php 5.6 include php file directly outputs the file content without execution, and php5.2 will be normal.
yoyo
yoyo 2019-06-07 00:44:09
0
1
1040

As shown in the figure, the code for executing the file is as shown below. . . .

QQ截图20190607003718.pngAs a result, the code in dbConfig.php is output directly to the browser. No analysis at all.

输出内容.png

Copy the code in dbConfig.php to the running php file and it will be normal

正常运行的代码.png

It is estimated to be 5.6 The version has upgraded the initialization and execution restrictions of the class. What do experienced heroes do?

yoyo
yoyo

reply all (1)
yoyo

Let me answer my own question. . hehe.

Please take a look at the php statement of dbConfig.php. It is for short tags. This will happen if the php.ini configuration does not enable short tag support. The problem is solved after turning on short_open_tag = On. . .

    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!