I’m trying to include a file in a page. The file is located in a folder called phpThumb which is placed inside my wordpress theme directory.
This is how I tried to include the file”
<?php require_once(get_bloginfo('template_url')."/phpThumb/phpThumb.config.php"); ?>
For some reason, this doesn’t work.
I did check and get_bloginfo() returns a value and does not echo a value.
I triple checked the code for validity and it’s all fine IMO…
What could possibly be wrong?
P.S ; It worked using $_SERVER['DOCUMENT_ROOT'] but the output of it is dependent on the current page (correct me if I’m wrong) so it’s not as efficient for me.
require_once expects a file in a directory not a url.
Replace
get_bloginfo('template_url')with the WordPress functionget_template_directory().