Hi folks, I'm wandering how include(); can be used with absolute url. For example, I need to make avaialble a footer.php file available over every php page created on my site. Can anyone tell me the correct syntax for include() and absolute url ? Best Regards, Tuning
Use an absolute path on your server. Remote files will not be parsed, you will get the output created. eg. /home/mydir/public_html/myphpfile.php http://us2.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen http://us2.php.net/manual/en/function.include.php
setup a php info page.. phpinfo.php <?php phpinfo(); ?> You will find the full path on the page. It is normally /home/username/public_html/yourcreateddir/file.php hope that helps.
no worries, trying to give back to the dp community.... i have received a lot of help from here. ;-) hope things work out for you.
Another way to find out the path of the directory that the PHP script is currently in, you would probably use this to test, is: <?php echo curdir(); ?> Unless you have changed directories in the executing script then this should be the directory of the executing script.