q2009a06z22 发表于 2017-3-26 06:57:20

关于php中的print EOF

  配对标记名的结尾标记名应单独一行,前后均不允许输出字符...(例如空格等不可见但存在的字符..)
  我写段php代码如下:
  <?
  if(test case)
  print<<<EOT
  <....html code....>
  EOF;
  else
  print<<<EOT
  <....html code....>
  EOF;
  ?>
  如上写法是不可以的,需要把EOF标识符顶格:
  <?
  if(test case)
  print<<<EOT
  <....html code....>
  
  EOF;
  else
  print<<<EOT
  <....html code....>
  EOF;
  ?>
页: [1]
查看完整版本: 关于php中的print EOF