i have this code in a page called process.php to create a page dynamically.

$string = '<?php
  ?> ';   
$fp = fopen("$post.php", "w");
fwrite($fp, $string);

if $post=big
then it creates a page big.php with this code


but i want to write $p='big' instead of $p=big on the big.php page ..so how can i do it ??

Recommended Answers

All 2 Replies

Did you try this:

$string = '<?php
  ?> ';



Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.