Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Louisville, KY
    Posts
    279
    Thanks
    0
    Thanked 0 Times in 0 Posts

    create a file with contents

    Found this thread which does what I want to do, but not when the new file contains php. Is there a better way to do this? Like maybe copy a file and rename it in order to get the new file? I'm trying to do it like this right now, but it's giving me a parse error.

    PHP Code:
    if($img_type!=""){
     
    $file_name $img_type.html;

     if (!
    is_file($epath '/' $file_name')){
      copy($epath . '
    /newevent.html', $epath . '/ . $file_name);
     }


  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    $file_name')){

    lose the '

    $file_name)){

    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Louisville, KY
    Posts
    279
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow, you would not believe how long I stared at that...

    Thank you!!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •