Hi

I have two sites. One is a front end and the other is a front end and content management in a sub domain. However they are set up locally as two different sites.

Which function should I use to check if a file exists (an image) from one domain to the other? I have tried file_exists and is_readable but they both return false when the file exists.

Thanks

    So you have two separate configurations for two separate domains pointing to the same virtual root? If they point to different virtual roots than I can't imagine why this is a PHP issue, perhaps you can elaborate. Just guessing, I'd assume you just need to use an absolute path when you do the file_exists and is_readable checks. See realpath for information on how to find each website's absolute path. Note, even then you may have issues with is_ readable because they technically shouldn't be readable to each other (permissions setup for a good reason.)

      Ok thanks. I cant check until I'm at work tomorrow but I'll take a look at that. It's on windows locally so that is probably the problem.

        Write a Reply...