PHP include variable file problem, Im confused!
-
Hi All
Am trying to include a template file in my theme, but the file name is a variable set at the back end (this works I can get the file name to echo properly)Im having problems getting the file to include in the index page. So far I have this:
<?php include bloginfo(‘template_directory’); ?>/thatfolder/<?php echo $test_test;?>`
with $test_test as the file name im after. Rather than pulling in the contents of the file it just echos the location, so I get:
http://localhost:8888/wptestsitedata/wp-content/themes/mytheme/thatfolder/FILENAME.php
With the variable FILENAME being correctly echoed.
I really want to include the contents of this file, but cant seem to make a simple include work with a variable.
Can anyone help?? Thanks if you can!!!
The topic ‘PHP include variable file problem, Im confused!’ is closed to new replies.