示例#1
0
文件: config.php 项目: aamlj/GitPHP
function mt_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars)
{
    //error message
    $message = "An error occurred in script '{$e_file}' on line {$e_line}:\n {$e_message}\n";
    //add the backtrace
    $message .= "<pre>" . print_r(debug_backtrace(), 1) . "</pre>\n";
    //show error in browser
    if (!LIVE) {
        echo '<div class = "alert alert-danger">' . n12br($message) . '</div>';
    } else {
        //print error
        error_log($message, 1, CONTACT_EMAIL, 'From:mljones699@mail.cfcc.edu');
        //only print if error is not a notice
        if ($e_number != E_NOTICE) {
            echo '<div class = "alert alert-danger">A system error occurred.  We apologize for the inconvience.</div>';
        }
    }
    //end of if-else
    return true;
}
示例#2
0
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="FormGet.php" method="post">
名前<br>
<input type="text" name="name"><br>
<input type="submit" name="submit" value="送信"></form>
</body>
</html>


<?php 
print $_POST["name"];
print n12br($_POST["note"]);