访问公用文件夹的子域

I've two sub-domains : 1) root/mobile where mobile points to m.mydomain.com 2)root/beta where beta points to beta.mydomain.com

But I want both the sub domains to access some common folders that are under root like root/images

You can access files in a directory higher than the one you are in with ... For example, let's say we're in root/mobile/index.php and we want to access root/lib/include.php. You could include the file with include('../lib/include.php');

Note: This assumes that the "common files" you are trying to access are both accessible from this user account.

See http://www.php.net/manual/en/function.imagecreatefromjpeg.php you could use it to have a PHP file that you place in both root/mobile and root/beta. It could then read in images from root/images.