$GLOBALS[\'s\']变量包含什么?它看起来像一个空数组,但它通常包含什么?
我在教程中遇到过:The WordPress Theme: Single Post, Post Attachment, & 404 Templates, 它提到了传递给printf
函数调用。
字符串如下所示:
//START OF STRING
$entry_utility = <<<LONGSTR
This entry was posted in %1{$s}%2{$s}.
Bookmark the <a href="%3{$s}" title="Permalink to %4{$s}" rel="bookmark">permalink</a>.
Follow any comments here with the
<a href="%5{$s}" title="Comments RSS to %4{$s}" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.
LONGSTR;
//END OF STRING
NOTE: I\'ve wrapped the long string from the tutorial inside a HEREDOC string instead, it was too hard to follow on the single line.
我已经将$s变量包装在花括号中,以防Herdocs无法正确解释它们。