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
    New Coder
    Join Date
    May 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Writing to a file

    I want to make an installer script that writes the variables to this...

    PHP Code:
    <?php
    //MYSQL host
    $mysqlhost="";
    //MYSQL user
    $mysqluser="";
    //MYSQL password
    $mysqlpass="";
    //MYSQL database
    $mysqldatabase="";
    //Short file directory
    $filefolder="";
    //Full path to the file directory
    $filedirectory="";
    ?>
    Anyone know how I could do this?
    Last edited by Darren06; 06-08-2004 at 04:26 AM.

  • #2
    New Coder
    Join Date
    May 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Bump :d

  • #3
    Regular Coder
    Join Date
    May 2004
    Location
    sweden
    Posts
    236
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This threads code should get you going:

    Finding in a file, then editing part of the file.

    You just have to change your file to look like:

    Code:
    <?php 
    $mysqlhost=""; /*MYSQL host */
    
    $mysqluser=""; /*MYSQL user */
     
    $mysqlpass=""; /*MYSQL password*/
    
    $mysqldatabase=""; /*MYSQL database */
    
    $filefolder=""; /*Short file directory*/ 
    
    $filedirectory=""; /*Full path to the file directory*/
    ?>
    Doing this will make it easier to do a split and load the contents into a form.
    Last edited by carl_mcdade; 06-08-2004 at 07:16 AM.
    Carl McDade
    _____________
    Hiveminds Magazine
    for web publisher and community builders
    eRuby Tutorials


  •  

    Posting Permissions

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