PHP include file from outside theme folder
Hi everyone I am new to wordpress and php
I have wordpress installed on my site in a subdirecoty called http://www.sitename.com/blog/
I am trying to include a file outside of the blog folder
<?php include( TEMPLATEPATH . ‘/includes/test-include.php’ ); ?>
However this does not work. If I put the folder includes into my theme folder the it does work
I also tried
<?php include(ABSPATH . ‘/includes/test-include.php’); ?>
but that does not work either
Can you include a file in your templates from outside the wordpress install folder?
I am thinking a virtual directory to /includes/ created in the blog folder would do the trick but there should be a better way no?
I am on wordpress 3 php 5 on iis 6
- The topic ‘PHP include file from outside theme folder’ is closed to new replies.