$bodytext = str_replace("%body%", "black", "<body text='%body%'>");var_dump($bodytext);echo str_replace("world","John","Hello world!");
$bodytext = str_replace("%body%", "black", "<body text='%body%'>");var_dump($bodytext);string(19) "4409787079b3087804275934638ce1f4"
谢谢
6580843315dd7804e35fd3743df832ea应该要用字符实体表示,输出的值为空,是浏览器把它当成一个html标签了:
$bodytext = str_replace("%body%", "black", "<body text='%body%'>");
var_dump($bodytext);
echo str_replace("world","John","Hello world!");
不知道您是不是指的这个?