This question already has an answer here:
- Full URL not working with php include 6 answers
I am trying to set up some php includes on a website and I cannot get them to work. The test codes do not echo in the index.php. If someone can see an error in the code I would appreciate it. Thanks
codes.php
<?php
$test1 = '123456';
$test2 = '1234567';
$test3 = '12345678';
?>
index.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>
</div>