网站建设php include 和 require区别

看了若是还不明白的话,我作了如下测试 网站建设
状况一:
<?php
    include("./est.php"); // est.php不存在
    echo "<br>continue...";
?>

测试结果:
Warning: include(./est.php): failed to open stream: No such file or directory in .../test1.php on line 2 Warning: include(): Failed opening './est.php' for inclusion (include_path='.:/usr/local/Cellar/php/5.3.10/lib/php') in .../test1.php on line 2
continue...

状况二:
<?php
    require("./est.php");
    echo "<br>continue...";
?>

测试结果 网站建设
Warning: require(./est.php): failed to open stream: No such file or directory in .../test1.php on line 2 Fatal error: require(): Failed opening required './est.php' (include_path='.:/usr/local/Cellar/php/5.3.10/lib/php') in .../test1.php on line 2 此处continue字符串没有打印出来。(fblww-0314)
相关文章
相关标签/搜索