The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

copy file to some user directories

Discussion in 'General Discussion' started by frazzle, Jan 2, 2005.

  1. frazzle

    frazzle Registered

    Joined:
    Aug 19, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I have just set up a account creating system that is linked with a payment system.

    I now am trying to it so you can do free accounts. I got it all working fine but I want it to put a file in their /home/user directory when the account is created.

    I dont want to use the skeleton directory thing as it will put it in everyones and I just need to put it in free accounts.

    Dose anyone know a way to move files (Im using php for the script)
     
  2. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    You don't want to move the files. You want to copy them

    PHP:
    <?
    if ([
    account is free]){
        
    copy("/root/file_for_free_account.php""/home/$username/");
    }
    ?>
     
Loading...

Share This Page