include() 与 fopen() 函数 差异与效率

WBOY
Release: 2016-06-13 12:32:10
Original
874 people have browsed it

include() 与 fopen() 函数 区别与效率
问一下各位大侠:include() 与 fopen() 函数 区别与效率

如果我要引用一个文件,是用include()效率高呢还是用  fopen() 效率高,他的区别又是什么,例如:

test.php 文件

 $ab="sfsadfsadfd....";
....
?>

高用文件,ab.php

include(test.php); 或 fopen(test.php)//是否都能调用$ab变量!
?>
现在主流的CMS 他的调用文件是用INCLUDE 还是用FOPEN 呢!

还有一个问题,我用include()引入文件件,量面的变量有中文他就会乱码,但我在头部以设成了UTF-8,在PHP5.2测试就会出现这样的情况,但在最新版的PHP里就没有出现这样的情况

include()乱码 fopen()?函数
Related labels:
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!