|
Posted by Madame Blablavatsky on 10/07/05 13:11
hello,
i want to make a php page on the fly.
i have made a very basic page that works fine:
------------ basic page source -------------
/* make file */
$file = fopen("02_output.php","w");
/* make source code for the new php page */
/* $inhoud = "<? echo 'wie wil er naar de kermis' ?>"; */
/* write code to the new php page */
$schrijven = fwrite($file, $inhoud);
fclose($file);
-----------------------------------------------
------------ source code from new php page: 02_output.php ---------
<? echo 'wie wil er naar de kermis' ?>
-----------------------------------------------------------------------
the problem is when the page gets a different structure: (see source code
below)
----------------- new basic page source ---------------------------
/* make file */
$file = fopen("02_output.php","w");
/* make source code for the new php page */
$inhoud .= "<? echo" ;
$inhoud .= " 'wie wil er naar de kermis'";
$inhoud .= " ?>";
*/
/* write code to the new php page */
$schrijven = fwrite($file, $inhoud);
fclose($file);
----------------------------------------------------------------------
when i want to open the new page (02_output.php) i get an error message:
Parse error: parse error, expecting `','' or `';'' in
c:\apache\htdocs\zrommelen\file_maken_20051007_02\02_output.php on line 1
i have tried everything, as far as i know, but i can't get it to work.
thanks
[Back to original message]
|