我想在php中用FileBegin=20151001
Begin=0001-Testing-1
End=0001-Testing-1
Begin=0002-Testing-2
End=0002-Testing-2
Begin=0003-Testing-3
End=0003-Testing-3
FileEnd=20151001
字符串替换一个字符。
<?
但它在html中显示为评论:
$tp ="UtmpV";
$tp = str_replace("U", "<?", $tp);
$tp = str_replace("V", " ; ?>", $tp);
echo $tp;
我该怎么做?
答案 0 :(得分:1)
不确定您在此尝试实现的目标,但请尝试:
$tp ="UtmpV";
$tp = str_replace("U", "<? ", $tp);
$tp = str_replace("V", " ?>", $tp);
echo $tp;
祝你好运!