How can we access the Folders out side the Web root Directory?
We are using WAMPSERVER 2.0(Apache 2.2.11,php 5.3.0 & My Sql 5.1.36 )
please Help me out
How can we access the Folders out side the Web root Directory?
We are using WAMPSERVER 2.0(Apache 2.2.11,php 5.3.0 & My Sql 5.1.36 )
please Help me out
I think you just need to learn how to read directories in php http://www.webcheatsheet.com/PHP/working_with_directories.php
usr
| - www
|- docs
|- A
|- webroot
|- index.php
Just use "normal" file paths. E.g. to access A
in the docs
folder from index.php
, you can use relative paths like ../docs/A
or absolute paths like /usr/www/docs/A
.
The "webroot" directory only marks the entry point for URLs. This has no effect on PHP files. They are just normal files in a filesystem and can therefore access other files in the system via ordinary file paths.