Re: upload problem
| From: | Daniel Brown | Date: | Wed, 23 Jan 2008 01:08:21 +0000 |
| Subject: | Re: upload problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267871@lists.php.net to get a copy of this message | ||
On Jan 22, 2008 8:01 PM, nihilism machine <nihilismmachine@gmail.com> wrote:
> any ideas why this does not work?
>
>
> class upload {
>
> function upload() {
> upload::uploader();
> }
>
> function uploader() {
> $FileName = basename($_FILES['upload1']['name']);
> if (move_uploaded_file($_FILES['upload1']['tmp_name'],
> $FileName)) {
> chmod($FileName, 0755);
> rename($FileName, "admin/advertisements/" . $FileName);
> return $FileName;
> } else {
> return "Error!";
> }
> }
> }
What do you mean "doesn't work"? Does it hit the "Error!" return,
does it do nothing, does it come up with a build error? If you're
more specific, you'll get better responses and quicker help.
--
</Dan>
Daniel P. Brown
Senior Unix Geek and #1 Rated "Year's Coolest Guy" By Self Since
Nineteen-Seventy-[mumble].