Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 28058

php: Including files relative to root

$
0
0

Hello all,

I'm running WebMatrix / IIS Express / Php v5.3

When I try to include a file which is relative to the root of the site then I get an error. For e.g. I have a directory called 'users' in my root which has to files 'index.php' and 'test.php'. If I use either of the below in 'index.php', it does not work.

<?php require '/users/test.php' ?>

OR

 <?php include '/users/test.php' ?>

I even tried using the full page URL ('http://localhost:1234/users/test.php') but that did not work as well.

Can anyone please advise what I'm doing wrong?

Thanks,


Viewing all articles
Browse latest Browse all 28058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>