PandoraBox: Program PHP Upload File
Demo Blog

Program PHP Upload File

by Sapto Mexavriand kategori :

Proses penyalin file dari komputer lokal ke dalam server. Server file umumnya menggunakan software sever FTP

12.1. PHP untuk Upload File


<html>
<body>
<h1>PHP Untuk Upload</h1>
<p> Input Nama File untuk Upload</p>
<form enctype="multipart/form-data" "<?php echo $PHP_SELF;
?>" method="post" action="coba12_1.php">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
Nama File <br> <input type="file" name="file1"
size="30">
<br><br>
<input name="Upload" type="submit" value="Upload">
</form>
<?
$namafile=$HTTP_POST_FILES['file1']['name'];
?>
<p> Nama file &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
: <?echo $namafile; ?> </p>
<?
$ukuran=$HTTP_POST_FILES['file1']['size'];
?>
<p> Ukuran File &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: <?
echo $ukuran; ?> </p>
<?
$temp=$HTTP_POST_FILES['file1']['tmp_name'];
?>
<?
if ($file1 !="none")
{
copy("$file1", "$namafile")
or die ("Nofiles!") ;
}
else
{
die ("");
}
?>
</body>
</html>
Share



Baca Artikel Terkait Lainnya:

0 komentar Read More ...

0 komentar


Posting Komentar

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!