I am trying to use a relative path to access my folders on the webserver.
Basically, i need to be able to read any subfolder under folder MAIN and echo its contents. I am able to do this if my path is static like c:\php\blah\blah. What i need is to use the webserver directories from my isp which only give me 'public_html' as the first folder (no root)
I tried
$fp = fopen ("/public_html/blah/file.txt", "r"); -- i got an error
$fp = fopen ("http://www.example.com/", "r"); -- i got an error
Note:
allow_url_fopen (I have this set up to ON in the ini file)


), but first I need to be able to open the directory.. MAYBE fopen is not the function i am looking for??