Codice PHP:
if (file_exists($nomefile))
{
fai questo }
else {
fai quello