{"id":98,"date":"2011-04-22T19:43:15","date_gmt":"2011-04-22T11:43:15","guid":{"rendered":"http:\/\/localhost\/sites\/?p=98"},"modified":"2011-04-22T19:51:56","modified_gmt":"2011-04-22T11:51:56","slug":"include%e7%9a%84%e5%ba%94%e7%94%a8%e9%99%84%e5%b8%a6require%e7%9a%84%e5%af%b9%e6%af%94","status":"publish","type":"post","link":"https:\/\/www.heliang.net.cn\/?p=98","title":{"rendered":"include\u7684\u5e94\u7528,\u9644\u5e26require\u7684\u5bf9\u6bd4!"},"content":{"rendered":"<blockquote><p>&#8212;&#8212;&#8212;&#8212;&#8212;a_include.php&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>\u00a0&lt;?php<br \/>\n\/**<br \/>\n\u00a0* QQ:5871029 Email:hel8@vip.qq.com<br \/>\n\u00a0* @copyright Horleun (c)2010<br \/>\n\u00a0* @author Horleun &lt;<a href=\"mailto:Horleun@foxmail.com\">Horleun@foxmail.com<\/a>&gt;<br \/>\n\u00a0*\/<br \/>\n$name=&#8221;Horleun&#8221;;<br \/>\n$sport=&#8221;\u7bee\u7403&#8221;;<br \/>\n?&gt;<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>&lt;?php<br \/>\n\/**<br \/>\n\u00a0* QQ:5871029 Email:hel8@vip.qq.com<br \/>\n\u00a0* @copyright Horleun (c)2010<br \/>\n\u00a0* @author Horleun &lt;<a href=\"mailto:Horleun@foxmail.com\">Horleun@foxmail.com<\/a>&gt;<br \/>\n\u00a0*\/<br \/>\nfunction example() {<br \/>\n\u00a0\u00a0\u00a0 global $sport;<br \/>\n\u00a0\u00a0\u00a0 include &#8216;a_include.php&#8217;;<br \/>\n\u00a0\u00a0\u00a0 echo $name . &#8220;\u559c\u6b22\u7684\u8fd0\u52a8\u662f&#8221; . $sport .&#8221;!&lt;br\/&gt;&#8221;;<br \/>\n}<br \/>\nexample();<\/p>\n<p>echo $name . &#8220;\u559c\u6b22\u7684\u8fd0\u52a8\u662f&#8221; . $sport .&#8221;!&lt;br\/&gt;&#8221;;\u00a0 \/\/\u53ea\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5168\u5c40\u53d8\u91cf,\u6240\u4ee5\u53ea\u80fd\u663e\u793a\u4e00\u4e2a!<\/p>\n<p>include&#8217;no_such_file.php&#8217;;<br \/>\necho&#8221;\u8fd8\u597d,\u6211\u53ef\u4ee5\u88ab\u8f93\u51fa!\u53ea\u662f\u591a\u4e2a\u8b66\u544a\u800c\u5df2&#8221;;<br \/>\nrequire &#8216;no_such_file.php&#8217;;<br \/>\necho&#8217;\u6211\u6ca1\u673a\u4f1a\u88ab\u8f93\u51fa\u4e86.&#8217;;<br \/>\n?&gt;<\/p><\/blockquote>\n<p>include\u7684\u5e94\u7528,\u9644\u5e26require\u7684\u5bf9\u6bd4!<\/p>\n<p>\u7ed3\u679c:<\/p>\n<blockquote><p>Horleun\u559c\u6b22\u7684\u8fd0\u52a8\u662f\u7bee\u7403!<\/p>\n<p><strong>Notice<\/strong>: Undefined variable: name in <strong>E:\\sites\\www\\moving\\non1146.php<\/strong> on line <strong>14<\/strong><br \/>\n\u559c\u6b22\u7684\u8fd0\u52a8\u662f\u7bee\u7403!<\/p>\n<p><strong>Warning<\/strong>: include(no_such_file.php) [<a href=\"http:\/\/localhost\/moving\/function.include\">function.include<\/a>]: failed to open stream: No such file or directory in <strong>E:\\sites\\www\\moving\\non1146.php<\/strong> on line <strong>16<\/strong><\/p>\n<p><strong>Warning<\/strong>: include() [<a href=\"http:\/\/localhost\/moving\/function.include\">function.include<\/a>]: Failed opening &#8216;no_such_file.php&#8217; for inclusion (include_path=&#8217;.;C:\\php5\\pear&#8217;) in <strong>E:\\sites\\www\\moving\\non1146.php<\/strong> on line <strong>16<\/strong><br \/>\n\u8fd8\u597d,\u6211\u53ef\u4ee5\u88ab\u8f93\u51fa!\u53ea\u662f\u591a\u4e2a\u8b66\u544a\u800c\u5df2<br \/>\n<strong>Warning<\/strong>: require(no_such_file.php) [<a href=\"http:\/\/localhost\/moving\/function.require\">function.require<\/a>]: failed to open stream: No such file or directory in <strong>E:\\sites\\www\\moving\\non1146.php<\/strong> on line <strong>18<\/strong><\/p>\n<p><strong>Fatal error<\/strong>: require() [<a href=\"http:\/\/localhost\/moving\/function.require\">function.require<\/a>]: Failed opening required &#8216;no_such_file.php&#8217; (include_path=&#8217;.;C:\\php5\\pear&#8217;) in <strong>E:\\sites\\www\\moving\\non1146.php<\/strong> on line <strong>18<\/strong><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212;&#8212;&#8212;&#8212;a_include.php&#8212; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/98"}],"collection":[{"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=98"}],"version-history":[{"count":3,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/98\/revisions"}],"predecessor-version":[{"id":100,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/98\/revisions\/100"}],"wp:attachment":[{"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}