This seems like the most basic thing in the world, but I don't know PHP.
I am trying to include a file on my page, and the directory of that file is specified inside of a variable.
<?php
$pageGroup = 'news';
$directory = 'http://localhost:8888/includes/'.$pageGroup.'/rightCol.html';
include($directory);
?>
When I echo
the results of $directory
, I get "http://localhost:8888/includes/news/rightCol.html", which is exactly right. Yet when I try to include the file at that directory, nothing happens. I am assuming this has something to do with the include syntax.
Any suggestions are appreciated.