[英]What is wrong with this attempt using php to include functions.php and header.php file?
What, if anything, is wrong with this code? 该代码有什么问题(如果有的话)? I'm a beginner. 我是初学者。 I'm trying to include a header file but when I test and try to load it says it's not working. 我正在尝试包含头文件,但是当我测试并尝试加载它时,它说它不起作用。
<?php include("http://test.orwallo.com/widget_corp/includes/header.php"); ?>
I can't tell for your HTTP 500
error. 我无法确定您的HTTP 500
错误。 But you are clearly using include()
wrong. 但是您显然使用include()
错误。
The include
or require_once
statement is used to load local php files. include
或require_once
语句用于加载本地php文件。 You should not have a reason to include URLs. 您应该没有理由包括URL。 Rewrite it to: 将其重写为:
<?php
require_once("./includes/functions.php");
include("./includes/header.php");
?>
Adapt the path. 调整路径。
我试图打开此文件,但似乎不存在
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.