Akash, I found a better answer from you, you can use include $_SERVER['DOCUMENT_ROOT'] to detect the path to site root and then you add the path relative to site root and that will work from any location in your site. If you have comments folder in site root then use this include path:
include ($_SERVER['DOCUMENT_ROOT']. '/comments/comments.php');
Adrian
Posted 6141 days ago
Hello Akash, is more like a php limitation, php scripts are included using relative paths: < ? php include '/comments/comments.php' ; ? > is correct but if you try: < ? php include 'www . site . com/comments/comments.php' ; ? > Then you are actually including only its plain html code.
Akash
Posted 6141 days ago
Great script. I've managed to include it on my website. But a big problem is the fact that you absolutely have to include the relative path and not the absolute path, otherwise comments appear on all pages. I've tried all sorts of workarounds. Nothing doing. Please reply back adrian. Thx.
Adrian
Posted 6144 days ago
Chris, send me an email, I can test on your server before you buy if you like.
Chris
Posted 6145 days ago
Are there any specs on the minimum version of PHP that is required to run this script? I have an odd situation where the PHP installed is an early 4.0something or other... It's not possible to upgrade the PHP (long story), so I need to know if this will work in that environment. thnx
hmm
Posted 6145 days ago
i have owned this script for long time and today when i activated the image verification, it didn't work. the image doesn't show. instead it shows the letter image verfication where the number is supposed to show.
If you have comments folder in site root then use this include path:
include ($_SERVER['DOCUMENT_ROOT']. '/comments/comments.php');
< ? php include '/comments/comments.php' ; ? >
is correct but if you try:
< ? php include 'www . site . com/comments/comments.php' ; ? >
Then you are actually including only its plain html code.