I have a simple apache2 server set up on my raspberry pi to run a local website at home.

I'd like to be able to use PHP to read the contents of other folders on the Raspberry Pi, outside of the specified wwwroot.

I actually keep my wwwroot in my samba drive on the raspberry pi, located in:


I'd like to be able to access other folders in the /network-drive directory using PHP scripts inside the website folder.

Is this possible? I tried disabling open_basedir in php.ini, but that didn't change anything!


Works fine on my default LAMP setup on raspbian. DocumentRoot is default /var/www/html, permissions on /storage is 755 and /storage/test is 644


echo $line;


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.