Hi
I'm trying to create a php script that will read all directorys/files from a specific folder and place the paths into a mysql db.
As I am new to PHP/apache I wondered how I could do this. I see php has a scandir function and I tried the following bit of code which returned some files but I have no idea where its getting its info.
PHP Code:
<?php
$dir = '/tmp';
$files1 = scandir($dir);
$files2 = scandir($dir, 1);
print_r($files1);
print_r($files2);
?>
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.
Thanks for your help.