0

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

$_SESSION['z']=$post;
$string = '<?php
$p='.$_SESSION['z'].'; 
  ?> ';   
$fp = fopen("$post.php", "w");
fwrite($fp, $string);
fclose($fp);

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

<?php
$p=big; 
  ?>

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

Edited by Nick Evan: Added CODE tags

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by aaloo
1

Did you try this:

$string = '<?php
$p="'.$_SESSION['z'].'"; 
  ?> ';

-Agarsia

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.