Practice out the truth, write a simple file PHP file include a JS file, after executing no error or warning message, while seeing the content of the file containing JS is printed out. Therefore, it concludes that the include target file can be any type.
Now look back at the official document of the include, which has the phrase: "When a file is included, the parser goes out of PHP mode at the beginning of the target file and enters HTML mode and resumes at the end of the file. For this reason, any code in the destination file that needs to be executed as PHP code must be included in the valid PHP start and end tags. "Note that the HTML schema mentioned in the PHP code must be included in a valid PHP tag", to carefully understand its meaning, it is implicitly explained that the include can be any type of file.
In addition, after 4.3.0, the include target file can also be a URL, if you need to set allow_url_include to on in the configuration.
http://www.bkjia.com/PHPjc/762614.html www.bkjia.com true http://www.bkjia.com/PHPjc/762614.html techarticle practice out the truth, write a simple file PHP file include a JS file, after executing no error or warning message, while seeing the content of the file containing JS is printed out. It is therefore concluded that ...