PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I would guess that your reference to the file being in /template would be the fall down point. / is a reference to the root of the file system, not the root of your website. You may look at $_SERVER['DOCUMENT_ROOT']