static function createAutoFormHtml($params, $reqUrl) { // <body οnlοad="javascript:document.pay_form.submit();"> $encodeType = isset ( $params ['encoding'] ) ? $params ['encoding'] : 'UTF-8'; $html = <<<eot <html> <head> <meta http-equiv="Content-Type" content="text/html; charset={$encodeType}" /> </head> <body οnlοad="javascript:document.pay_form.submit();"> <form id="pay_form" name="pay_form" action="{$reqUrl}" method="post"> eot; foreach ( $params as $key => $value ) { $html .= " <input type=\"hidden\" name=\"{$key}\" id=\"{$key}\" value=\"{$value}\" />\n"; } $html .= <<<eot <!-- <input type="submit" type="hidden">--> </form> </body> </html> eot; $logger = LogUtil::getLogger(); $logger->LogInfo ( "自动跳转html>" . $html ); return $html; }
php 生成html代码和页面
最新推荐文章于 2024-05-06 20:18:59 发布