I would like to give the opportunity to my websites users to upload files on the server. Is this the good syntax??
<html>
<head>
<title>Chargement de fichier</title>
</head>
<body>
<H3>Cette page vous permet d'envoyer un fichier sur le serveur</H3>
<form action="upload.php" enctype="multipart"/form-data" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1024"/>
Charger le fichier: <input name="fichier" type="file" /><br />
<input type="submit" value="GO >>">
</form>
</body>
</html>
do I have to use move_uploaded_file after?? I think this syntax change the name of the file. Is it true??? If yes how to keep the real name of the file?????
upload a file
Moderator: General Moderators
- daven
- Forum Contributor
- Posts: 332
- Joined: Tue Dec 17, 2002 1:29 pm
- Location: Gaithersburg, MD
- Contact:
viewtopic.php?t=6435
Code/discussion about file uploading scripts
Your code seems to be decent for the client side. The processing stuff is entirely separate.
Code/discussion about file uploading scripts
Your code seems to be decent for the client side. The processing stuff is entirely separate.
Hi daven
You gave me many advices today and i would like to thank you. I looked the link you wrote.
If i understand well with the code of the men you helped the name of the uploaded file keep his temporary name?!?!
and what about the downloading of files?
For the end of the day you are going to hate me
You gave me many advices today and i would like to thank you. I looked the link you wrote.
If i understand well with the code of the men you helped the name of the uploaded file keep his temporary name?!?!
and what about the downloading of files?
For the end of the day you are going to hate me
so far as i know, the file is saved to a temp dir with its origional name. Obviously you dont want to leave it there, so you should copy it to somewhere else.
If i understand it right $userfile is the name of the file.
If i understand it right $userfile is the name of the file.