plaintext - PHP code as plain text -
is there way output php code plain text? have php code stored in mysqli database, want fetch php code , display in div. don 't want php code executed. or there way use file_put_contents() fill file php code? again; don 't want php code executed. either want php code displayed plain text or put in file plain text.
for example have code stored in database:
<doctype> <html> <head> <title>test</title> </head> <body> <?php $array = array('test1', 'test2'); foreach($array $val) print($val); print('works!'); ?> </body> </html>
but when print code entire php code won't visible.
or there way put php code database file using file_put_contents
if code stored in database, have echo in div. run query, string, echo. won't executed. need run through htmlentities things <
, &
, quotes show on page correctly.
Comments
Post a Comment