php 重定向错误和输出
25 August 2018
<?php

ini_set('display_errors', 'on');

error_reporting(E_ALL);


fclose(STDOUT);
fclose(STDERR);

$STDOUT = fopen('/path/to/file.log', "a");
$STDERR = fopen('/path/to/file.log', "a");

throw new Exception('xxxxx');