Hi there, I have been playing round for ages, and can not get the following to work: <?php $path="/home/example/public_html/photogifts/uploader/"; if (getdomain($path) == 'www.example.co.nz'){ include($path.'form.php'); } ?> Code (markup): or <?php include("/home/example/public_html/photogifts/uploader/form.php");?> Code (markup): trying to include in an uploader form from the uploader directory in the index file of the photogifts directory.
The second one should work fine so long as that's an actual path to the file. The first one I can't really say since I don't know what the getdomain() function does or how it figures out if that path links to that domain (since it's not like the domain is mentioned in it).
The bogey monster won't allow you. On the other hand, the second code should work fine. Try debugging (echo 1 on form.php). If all fails, use require instead and it'll throw an error and tell us that error to help you out. Peace,
My idea is that your path is relative to your root, which is not public. Try the following: <?php $path="../photogifts/uploader/"; if (getdomain($path) == 'www.example.co.nz'){ include($path.'form.php'); } ?> PHP: