Re: Whats the best way.

From: Date: Thu, 24 Jan 2002 09:50:17 +0000
Subject: Re: Whats the best way.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-81846@lists.php.net to get a copy of this message
Read this through: http://www.php.net/manual/en/features.file-upload.php Consider then: http://www.php.net/manual/en/function.is-uploaded-file.php After that read: http://www.php.net/manual/en/function.move-uploaded-file.php and then do it like that: -upload form -check if user has uploaded a file (he could have sent an empty form) -check what extension is needed (.jpg, .gif or whatever) -move_uploaded_file($userfile, "Your/Directory/".time().$extension) hope this helps stefan rusterholz ----- Original Message ----- From: "Philip J. Newman" <newmanpj@philipsdomain.com> To: <php-general@lists.php.net> Sent: Thursday, January 24, 2002 9:47 AM Subject: [PHP] Whats the best way. Whats the best way that I can let users upload single .jpeg and gif files, renaming then with a time stamp? Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ info@philipsdomain.com Phone: +64 25 6144012

« previous php.general (#81846) next »