5242880)//大于5M自动切换 { rename($notify_file, $log_base_dir.'notify_'.date('Y_m_d_H_i_s').'.txt'); } if(!file_exists($notify_file)) { @touch($notify_file); @chmod($notify_file, 0770); } // 日志文件 end $_REQUEST = isset($_REQUEST) ? $_REQUEST : array(); if($_REQUEST) { file_put_contents($notify_file, "\r\n\r\n".date('Y-m-d H:i:s')." [notify][入口接收request]".json_encode($_REQUEST), FILE_APPEND); } else { $xml = file_get_contents("php://input"); file_put_contents($notify_file, "\r\n\r\n".date('Y-m-d H:i:s')." [notify][入口接收php://input流原始数据] \n".$xml, FILE_APPEND); $xmlObj = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA); file_put_contents($notify_file, "\r\n\r\n".date('Y-m-d H:i:s')." [notify][入口接收php://input流] ".json_encode($xmlObj), FILE_APPEND); } ini_set('display_errors','On'); //$_GET['s']='/Admin/Payment/receive/'; // 定义应用目录 define('APP_PATH', __DIR__ . '/../application/'); // 加载框架引导文件 require __DIR__ . '/../thinkphp/base.php'; // 绑定到admin模块 \think\Route::bind('admin/Payment/notify'); // 关闭路由 \think\App::route(false); // 设置根url \think\Url::root(''); // 执行应用 \think\App::run()->send(); ?>