This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| set_exception_handler('MyException::custException'); //我自己定义的顶层异常处理函数 | |
| class MyException { | |
| function __construct($file = null) { | |
| $this->file = $file; | |
| try { | |
| if (! file_exists($file)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| date_default_timezone_set('PRC'); | |
| $db = mysqli_connect('localhost', 'user', 'password', 'dbname', 3306); | |
| $action = $_GET['action']; | |
| switch ($action) { | |
| case 'import': | |
| # code... | |
| break; | |
NewerOlder