reference an ubuntu directory
Posted: Wed Mar 25, 2009 5:39 am
Hi
I did a the normal LAMPP installation on my ubuntu machine. I know my installation is stored under /opt/lampp and my webpages are under /opt/lampp/htdocs.
My question is how do I point to another directory in PHP. I want to point to /opt/lampp/web_site_copy/pictures
Do i need to make changes to my apache config file and if so how do i do it?
I looked throught my phpinfo() and doc_root is not specifed and neither is user_doc.
I am new at using php so please bear with me and thanks for the support its really appreciated.
When I run this code it does return some values but I'm not sure where there "tmp" directory is.
I did a the normal LAMPP installation on my ubuntu machine. I know my installation is stored under /opt/lampp and my webpages are under /opt/lampp/htdocs.
My question is how do I point to another directory in PHP. I want to point to /opt/lampp/web_site_copy/pictures
Do i need to make changes to my apache config file and if so how do i do it?
I looked throught my phpinfo() and doc_root is not specifed and neither is user_doc.
I am new at using php so please bear with me and thanks for the support its really appreciated.
Code: Select all
<?php
$dir = '/tmp';
$files1 = scandir($dir);
$files2 = scandir($dir, 1);
print_r($files1);
print_r($files2);
?>