i can’t understand one thing. In code, for example:
$filePath = 'http://wwww.server.com/file.flv';
if( file_exist($filePath) )
{
echo 'yes';
}
else
{
echo 'no';
}
Why does script return ‘no’, but when i copy that link to the browser it downloads?
The file_exists() function is looking for a file or directory that exists from the point of view of the server’s file system. If http://www.server.com/ equates to /home/username/public_html/ then you need to make your code:
See http://php.net/file_exists for more info.