Hello i am using the code bellow to write the following line inside a .php file.
$stringDatar = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.0//EN'\n";
fwrite($handler, $stringDatar);
I am trying to do the same to write inside a php file with the following code but it doesn't wite the php code.
$stringDatar = "'.<?php $_GET['p']\n.'";
fwrite($handler, $stringDatar);
Any ideas?
fopen, is$handlera resource, or does thefopencall fail? What mode is the handle in (a,w, ...?) any specific errors/warnings (turn display_errors on, and set the error_reporting to the maximum setting (E_STRICT|E_ALL). You're also doing weird things with the dots (concat operator). To concatenate string, the.shouldn't be inside the quotes:$foo = 'a string'; $foo = '.rest';reassings$foo, to concatenate:$foo .= 'rest';(note.=) or$foo = $foo . 'rest';It's basic syntax