$file = 'test.php';
// Open the file to get existing content
$current = file_get_contents($file);
// Append a new person to the file
$current = $postResult;
// Write the contents back to the file
file_put_contents($file, $current);
echo $postResult;
...?> <?php header('HTTP/1.0 404 Not Found'); ?>теперь 404 отдается серверу. Но если страница есть, появляется сообщение об ошибке - header уже был передан т.е. пытается сработать 404, но в результате 200 ок как и нужно. Можно с помощью else сделать, чтобы при ответе 200 ок, 404 не отдавалась? Спасибо!