PHP outside Site Directory

I own a server with several accounts on them.

I manage all of the accounts from a master account.

At the moment all of the other accounts get set stuff (from the main account) using php’s ftp functions which works fine.

However now i need to search a folder on the other accounts and make thumbnails of images the script finds.

Question: Can/How can I allow php to have access out of its own folder??

/home/main_account/public_html/script.php

script then checks these folders

/home/acc1/public_html/images/ <– makes thumbnails (so read and write)
/home/acc2/public_html/images/ <– makes thumbnails (so read and write)

etc

Cheers Guys

PHP can access files for inclusion outside your web root, yes. However, this is limited to files that php needs to access for server side use - like database configuration files that you’d rather not give public access to. You cannot link to images that are not in your document root because they would not have a URL from your domain.

As far as accessing the folders and files on your drive there aren’t really any limitations as long as the process php is running in has access to those files. (It may not if the process is running under a user without privileges to do so.)