sidebar in different directory
-
I have my blog in the directory /blog. I have another page (other script) in the directory /blog/books. I want to get my sidebar from /blog and get it to work in /books. If I include sidebar.php it doesn’t work, and if I include ../sidebar.php I get the error
# Notice: Use of undefined constant TEMPLATEPATH - assumed 'TEMPLATEPATH' in /home/phantasm/public_html/blog/sidebar.php on line 6 Warning: include(TEMPLATEPATH/searchform.php) [function.include]: failed to open stream: No such file or directory in /home/phantasm/public_html/blog/sidebar.php on line 6 Warning: include(TEMPLATEPATH/searchform.php) [function.include]: failed to open stream: No such file or directory in /home/phantasm/public_html/blog/sidebar.php on line 6 Warning: include() [function.include]: Failed opening 'TEMPLATEPATH/searchform.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/phantasm/public_html/blog/sidebar.php on line 6 Fatal error: Call to undefined function is_404() in /home/phantasm/public_html/blog/sidebar.php on line 15But the HTML that I have put in the sidebar.php file is working.
How do I get the links to work (and avoid nasty PHP errors?
blog: http://phantasmagoria.spinbluemagic.net/blog
script: http://phantasmagoria.spinbluemagic.net/blog/books/index.php
The topic ‘sidebar in different directory’ is closed to new replies.