i have subdomain sub.domain.com. the subdomain points on a directory root/sub of my root dir on my Webserver. now i have pdfs on another dir on the server root/pdf. How can i check if a specific pdf exists and if it exists i want to copy the file to a temp dir of the subdomain.
if i call a php script sub/check.php an try to check a pdf that exists :
$filename = "http://www.domain.com/pdf/1.pdf";
if (file_exists($filename))
{
"exists";
}
else
{
"not exists";
}
It always shows : not exists. If i take the url and put it in a browser - the pdf will be shown.
How can my php script in the /sub-folder access files in the root or root/pdf ?
bye jogi