php 生成html代码和页面

static function createAutoFormHtml($params, $reqUrl) {
      // <body onload="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 onload="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;
   }
相关文章
相关标签/搜索