Home >Backend Development >PHP Tutorial >怎么把存入数据库的PHP代码读出来

怎么把存入数据库的PHP代码读出来

WBOY
WBOYOriginal
2016-06-13 11:55:58944browse

如何把存入数据库的PHP代码读出来
我想问一下各位我如何把PHP代码或html代码完整的读出来在php页面直接使用
------解决方案--------------------

$s =<<< TXT<br />array( 'small'  => 'Small Shirt', 'med'    => 'Medium Shirt', 'large'   => 'Large Shirt', 'xlarge' => 'Extra Large Shirt',);<br />TXT;<br />$a = eval("return $s");<br />print_r($a);
Array
(
    [small] => Small Shirt
    [med] => Medium Shirt
    [large] => Large Shirt
    [xlarge] => Extra Large Shirt
)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn