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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    php create new file

    Well the easiest way for me to explain was to create an images so :



    im not even sure if this is possible :P
    but please help

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,042
    Thanks
    19
    Thanked 42 Times in 42 Posts

  • #3
    Regular Coder mic2100's Avatar
    Join Date
    Feb 2006
    Location
    Scunthorpe
    Posts
    562
    Thanks
    15
    Thanked 28 Times in 27 Posts
    u need to do sumthing like this...

    PHP Code:
    <?
    $handle 
    fopen($_POST['filename'], "w+");
    $content "<?php include('header.txt'); ?> More Content <?php include('footer.txt'); ?>";

    fwrite($handle$content);

    fclose($handle);
    ?>
    That is basicly what you require you may want to check out the function on www.php.net for more information.

  • #4
    Senior Coder
    Join Date
    Jul 2005
    Location
    UK
    Posts
    1,051
    Thanks
    6
    Thanked 13 Times in 13 Posts
    There is also plenty of information on creating a new file here - http://www.google.co.uk/search?q=Cre...File+Using+PHP


  •  

    Posting Permissions

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