[英]Include php file in Wordpress' functions.php not working for header.php
[英]What is wrong with this attempt using php to include functions.php and header.php file?
该代码有什么问题(如果有的话)? 我是初学者。 我正在尝试包含头文件,但是当我测试并尝试加载它时,它说它不起作用。
<?php include("http://test.orwallo.com/widget_corp/includes/header.php"); ?>
我无法确定您的HTTP 500
错误。 但是您显然使用include()
错误。
include
或require_once
语句用于加载本地php文件。 您应该没有理由包括URL。 将其重写为:
<?php
require_once("./includes/functions.php");
include("./includes/header.php");
?>
调整路径。
我试图打开此文件,但似乎不存在
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.