A ver...
estuve haciendo pruebas y sustituyendo la primera y la última comilla doble por comillas simples, y quitando el <?php consigues que las $ te las lea.
Todavía no pude hacer que aparezca <?php como inicio. Pero estoy en ello XD
YA LO TENGO.
Dame 2min y te lo cuelgo hecho XD
Código PHP:
<?php
$archivo= "config.php"; // el nombre del .php
$nombre= $_POST['nombre'];
$fch= fopen($archivo, "w"); // Abro el archivo config.php
fwrite($fch, '<?php
$path_thumbs = "../fotos/'.$nombre.'/'.$nombre.'";
$path_big = "temp";
//the new width of the resized image.
$img_thumb_width = 300; // in pixcel
$extlimit = "yes"; //Do you want to limit the extensions of files uploaded (yes/no)
//allowed Extensions
$limitedext = array(".gif",".jpg",".png",".jpeg",".bmp");
//check if folders are Writable or not
//please CHOMD them 777
if (!is_writeable($path_thumbs)){
die ("Error: The directory <b>($path_thumbs)</b> is NOT writable");
}
if (!is_writeable($path_big)){
die ("Error: The directory <b>($path_big)</b> is NOT writable");
}
?>\r\n');
fclose($fch); // Cierro el php.
?>
P.D: Estoy con hector2c, esto huele a ataque, pero te deseo suerte XD
Debería funcionar así, vamos