Display php code with fwrite inside a php file -


hello using code bellow write following line inside .php file.

$stringdatar = "<!doctype html public '-//w3c//dtd xhtml+rdfa 1.0//en'\n"; fwrite($handler, $stringdatar); 

i trying same write inside php file following code doesn't wite php code.

$stringdatar = "'.<?php $_get['p']\n.'"; fwrite($handler, $stringdatar); 

any ideas?

variables expanded inside double quotes, it's putting value of $_get['p'] file. need escape dollar sign written literally.

$stringdatar = "'.<?php \$_get['p']\n.'"; 

Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -