简体   繁体   中英

what does the following tag mean [cc lang=”php”]

I have been trying to learn php streams and I've come across this sentence which looks like it is doing the job of the php opening tag, could you please explain me what it is, or provide me with documentation, here is the code:

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

This is not a PHP code, it's just an example with syntax highlighting for a WordPress blog, so you can add some nice colored Code Snippets in different (not only PHP) languages to your blog page. Thats's code coloring (syntax highlight) from WordPress or a WordPress plugin

Example:

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

Here is a link with more information about it.

If you want to make your code highlighting work, you have to add the closing tag [/cc]

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM