You are here: Re: PHP file upload form « PHP Programming Language « IT news, forums, messages
Re: PHP file upload form

Posted by Jacob Lyles on 10/05/80 11:49

Oh, and on my first example I forgot to close my first <form> tag with
the right bracket. Don't forget to close yours.


bjkstudio@hotmail.com wrote:
> Is this how my uploader.php file should look? Does the function spcript
> go directly beneath the
> php code? Thanks
> -----------------------------------
>
>
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;
> charset=ISO-8859-1">
> <title>Untitled Document</title>
> </head>
> // Where the file is going to be placed
> $target_path = "uploads/";
>
> /* Add the original filename to our target path.
> Result is "uploads/filename.extension" */
> $target_path = $target_path . basename(
> $_FILES['uploadedfile']['name']);
> $_FILES['uploadedfile']['tmp_name'];
>
> $uploaddir = './dir/';
> $file_name = $_FILES['userfile']['name'];
> $uploadfile = $uploaddir . $file_name;
> move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile);
> <body>
> </body>
> </html>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация