1

Topic: Can't get extern.php to work

Hi have these paths:

/blog/default.php <- main webpage
/forum/extern.php <- in here are all the forum files and the extern.php

I can't get the extern.php to work.

in my default.php I have added the following:

<?php
include('../forum/extern.php'); 
?>

This does not work, if i put a file inside the blog folder and include it it works but it seems its not working If I try change to a file in another folder.

Can this be due to .htaccess or have I done anything else wrong?

2

Re: Can't get extern.php to work

did you try using the complete path?

ie

<?php
include('http://site.tld/forum/extern.php'); 
?>

Re: Can't get extern.php to work

Or you can use this I believe.

<?php
include('/forum/extern.php'); 
?>

The / at the start indicates you want to start from root level of the domain name. This is handy if you change your domain name in the future then you wont have to change the code.