Jump to content

making a file


makka

Recommended Posts

hay i need to make a file and call it a variable (the users name) it is a registration script and they get a file each eg

 

i make an account and i call my name makka then the script will make a new file called makka in side of a file called userfiles

 

any help?

Link to comment
Share on other sites

how are you storing the user names, cause i think you could do somthing along this line.

 


<?php

$doc = fopen ($user.".doc", "w");

fwrite ($doc,'first line');
fwrite ($doc,'second line');

//so on and so forth

fclose ($doc);

?>

 

that is untested and i am very tired so dont take it as perfect.

 

~D

Link to comment
Share on other sites

thanks yeah i have all thou it is vista which asks you twice is you are sure but... but is some one could just whip up a script they have tested for a host that will make a file by the by the name of what ever the variable $username is

Link to comment
Share on other sites

thanks yeah i have all thou it is vista which asks you twice is you are sure but... but is some one could just whip up a script they have tested for a host that will make a file by the by the name of what ever the variable $username is

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.