<?
         /*
         ** open file for writing
         */
         $filename = "data.txt";
         if(!($myFile = fopen($filename, "w")))
         {
                 print("Error: ");
                 print("'$filename' could not be created\n");
                 exit;
         }

         //write some lines to the file
         fputs($myFile, "Save this line for later\n");
         fputs($myFile, "Save this line too\n");

         //close the file
         fclose($myFile);


         /*
         ** open file for reading
         */
         if(!($myFile = fopen($filename, "r")))
         {
                 print("Error:");
                 print("'$filename' could not be read\n");
                 exit;
         }

         while(!feof($myFile))
         {
                 //read a line from the file
                 $myLine = fgets($myFile, 255);

                 print("$myLine <BR>\n");
         }

         //close the file
         fclose($myFile);
?>


At 12:27 PM 3/6/01 -0500, Jaxon wrote:
>Any examples on this?
>
>regards,
>jaxon
>
>On 3/6/01 11:39 AM, "Rick St Jean" <[EMAIL PROTECTED]> wrote:
>
> > I would use the the php to write to a CSS include.  That way you have the
> > tightest control
> > over elements and design.
> > Rick
> >
> > At 12:12 AM 3/7/01 +0800, you wrote:
> >> Does any body know how to use php to generate html file? That is when 
> a user
> >> input for a webpage title, webpage background color or image in a php 
> page,
> >> and then we can generate a html file which contains the properties of 
> user's
> >> input such as background color.
> >>
> >>
> >>
> >> --
> >> PHP Database Mailing List (http://www.php.net/)
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > ##########################################################
> > #  Rick St Jean,
> > #  [EMAIL PROTECTED]
> > #  President of Design Shark,
> > #  http://www.designshark.com/
> > #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> > #  Tel: 905-684-2952
> > ##########################################################
> >
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

##########################################################
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##########################################################


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to