Stai testando online oppure in locale sul tuo pc?
Nel secondo caso, metti il percorso completo (es. http://localhost/file.php)