我正在尝试在网站上设置一些 php 包含,但我无法让它们工作。测试代码不会在 index.php 中回显。如果有人可以在代码中看到错误,我将不胜感激。谢谢
代码.php
<?php
$test1 = '123456';
$test2 = '1234567';
$test3 = '12345678';
?>
索引.php
<html>
<head>
<title>Testing</title>
</head>
<body>
<span><?php include 'http://www.mydomain.com/includes/codes.php'; echo "$test1"; ?></span>
<span><?php include 'http://www.mydomain.com/includes/codes.php'; echo "$test2"; ?></span>
<span><?php include 'http://www.mydomain.com/includes/codes.php'; echo "$test3"; ?></span>
</body>
</html>