【问题标题】:what does the following tag mean [cc lang=”php”]以下标签是什么意思 [cc lang=”php”]
【发布时间】:2015-10-06 07:00:06
【问题描述】:

我一直在尝试学习 php 流,我遇到了这句话,它看起来像是在做 php 开始标签的工作,请你解释一下它是什么,或者提供给我文档,这里是代码:

 [cc lang="php"]$opts = array(
     'http' => array(
     'method' => "GET",
     'header' => "Accept-language: en\r\n" .
     "Cookie: foo=bar\r\n"
   )
 );

【问题讨论】:

  • [cc lang=”php”]$opts = array( 'http' => array( 'method' => "GET", 'header' => "Accept-language: en\r \n” . “Cookie: foo=bar\r\n” ) );
  • 那不是 PHP 代码,与 PHP 无关。

标签: php arrays methods stream tags


【解决方案1】:

这不是 PHP 代码,它只是 WordPress 博客的语法高亮示例,因此您可以在博客页面中添加一些不同(不仅是 PHP)语言的漂亮的彩色代码片段。这就是来自 WordPress 或 WordPress 插件的代码着色(语法高亮)

例子:

[cc lang="php"]
  some php code
[/cc]

这里是link,其中包含更多信息。

如果你想让你的代码高亮工作,你必须添加结束标签[/cc]

[cc lang="php"]
$opts = array(
     'http' => array(
     'method' => "GET",
     'header' => "Accept-language: en\r\n" .
     "Cookie: foo=bar\r\n"
   )
 );
[/cc]

【讨论】:

    猜你喜欢
    • 2011-01-20
    • 2011-02-27
    • 1970-01-01
    • 2018-06-02
    • 2010-12-07
    • 2022-01-14
    • 2014-01-08
    • 1970-01-01
    • 2017-05-30
    相关资源
    最近更新 更多