have php create a new .html file on my server...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kurrent

    have php create a new .html file on my server...

    i have some data in a variable ($message) that is being emailed with
    the php's mail() function (an html email actually)...i'd like to also
    take that html data in the $message variable and have my script also
    make a new .html (with any random name) file on my server with that
    $message data, any easy way to do that? Cheers!

  • ZeldorBlat

    #2
    Re: have php create a new .html file on my server...

    On Jul 4, 11:33 pm, Kurrent <kurr...@gmail. comwrote:
    i have some data in a variable ($message) that is being emailed with
    the php's mail() function (an html email actually)...i'd like to also
    take that html data in the $message variable and have my script also
    make a new .html (with any random name) file on my server with that
    $message data, any easy way to do that? Cheers!
    Suppose you have the HTML you want to store in a variable called $html
    and you want to put it in a file called foo.html. Then you would do
    something like this:

    file_put_conten ts('foo.html', $html);

    Comment

    • Kurrent

      #3
      Re: have php create a new .html file on my server...

      On Jul 4, 9:41 pm, ZeldorBlat <zeldorb...@gma il.comwrote:
      On Jul 4, 11:33 pm, Kurrent <kurr...@gmail. comwrote:
      >
      i have some data in a variable ($message) that is being emailed with
      the php's mail() function (an html email actually)...i'd like to also
      take that html data in the $message variable and have my script also
      make a new .html (with any random name) file on my server with that
      $message data, any easy way to do that? Cheers!
      >
      Suppose you have the HTML you want to store in a variable called $html
      and you want to put it in a file called foo.html. Then you would do
      something like this:
      >
      file_put_conten ts('foo.html', $html);


      worked like a charm, thanks ZeldorBlat!


      Comment

      Working...