E' un po un vero CASINO far creare pagine.php da un file.php ma è possibile:
Codice PHP:
$nome = "url_file/nome";
$est = ".php";
$as = "$";
$nome_variabile_1 = "nome della variabile_1";
...
$contenuto1 = "valore_della_prima_variabile";
...
$file_name="$nome$est";
$complete_path=$file_name;
$var=fopen($complete_path,"x+");//Creo il file
$fp = fopen($complete_path,"x+"); //Creo il file
fwrite($var,"
<?php
$as$nome_variabile_1=\"$contenuto1\";
$as$nome_variabile_2=\"$contenuto2\";
$as$nome_variabile_3=\"$contenuto3\";
?>
");
fclose($fp);