Problem with including PHP file
Ok So this is driving me crazy..
Basically I am trying to pull from the database and out the format in JSON using php. I had the file (mapdata.php) in a folder in the root of the installation. I included the wp-blog-header.php and if I went directly to the file in the browser it would work and output what I wanted.
So I then have a custom page template that I am have integrated Google maps.
I need to include the php file(mapdata.php) I created earlier into the custom page template but it will not let me. I tried moving mapdata.php to the root dir of the theme and then I could not use it because it would ot include get_bloginfo() or get_header() so that I could connect to the database. I know there is a way but I can’t seem to find out how to do it.
Does anyone have any idea what I need to do to get it to work like I want it to. This is a custom script for a client so I can not use a plugin.
Thanks in advance!!!
- The topic ‘Problem with including PHP file’ is closed to new replies.