If I include the "$" in front of "_SESSION..." I get a program error. Is there anyway to write "$_SESSION..." to the file without getting an error?
<?php
Echo "Write file.........";
// write first file
$filename = 'olgtemp1.php';
$open_it = fopen($filename, 'w+') or die("Can't open file");
$line1 = "<?php \n";
$rc = fwrite($open_it, $line1);
$line2 = "session_start(); \n";
$rc = fwrite($open_it, $line2);
$line3 = "//Temp file created by olg13.php for use by olglistpics.php \n";
$rc = fwrite($open_it, $line3);
$line4 = "_SESSION['pic_Index']='10030'; \n";
$rc = fwrite($open_it, $line4);
$line5 = "include('olglistpics.php'); \n";
$rc = fwrite($open_it, $line5);
$line6 = "?>";
$rc = fwrite($open_it, $line6);
fclose($open_it);
?>
Thanks,
Jon


Sign In
Create Account


Back to top









