$filename='/scripts/arranque/control.conf'; if (!file_exists($filename)) { $fp = fopen($filename, "w+"); fwrite($fp, '1'); fclose($fp); } else { $fp = fopen($filename, "a"); fwrite($fp , '1'); fclose($fp); }