The eval function is a string escape, which is extremely painful. Please help the following code and output a correct href: 111 <;? Php $ tb; $ wcHead $ tb. & lt; tr & gt; $ wcTable; $ wcFoot & lt; tr & gt; $ t1111111fdddd; $ wcTabl eval function, a string escape, extremely painful, thank you!
The following code is correct. you can correctly output an href. when you click it, 111 is displayed.
$ Tb = '';
$ WcHead = '$ tb. = \'';
$ WcTable = '';
$ WcFoot ='\';';
$ T = '11111fdddd ';
$ WcTable ='Test'; // --------- Note that
$ Wc = $ wcHead. $ wcTable. $ wcFoot;
Eval ($ wc );
Echo $ tb;
?>
However, what I want to implement is: $ t = '1111111fddddd' pops up at a click. how can I implement the value of this variable ?? The following is an error:
$ WcTable ='Test';
$ WcTable ='Test';
------ Solution --------------------
$wcTable=<<
test
html;
------ Solution --------------------
$ Tb = '';
$ WcHead = '$ tb. = \'';
$ WcTable = '';
$ WcFoot ='\';';
$ T = '11111fdddd ';
$ WcTable ='Test'; // --------- Pay attention to this
$ Wc = $ wcHead. $ wcTable. $ wcFoot;
Eval ($ wc );
Echo $ tb;
?>
------ Solution --------------------
Reference:
Reference: PHP code? 123 $ wcTable = < TestHtml;
No, it's parsed.
Test
Why not? Pop up 1111111 fdddd. isn't it exactly what you want?