Jump to content
php.lv forumi

Galerija


No0ne*

Recommended Posts

Sveiki!

 

Es atradu bilžu augšupielādēšanas skriptu, bet nemāku uztaisīt, lai augšupielādētā bilde parādītos uz manas lapas, nevis mapītē IMAGES... :(

 

Man vajag lai būtu tāda kā galerija...

 

Lūdzu pielabojiet to vietu, kur tas ir vajadzīgs....

 

Skripts:

 

<form action="" method="post" enctype="multipart/form-data">

<p>Pictures:

<input type="file" name="pictures[]" />

<input type="submit" value="Send" />

</p>

</form>

 

<?php

//places files into same dir as form resides

foreach ($_FILES["pictures"]["error"] as $key => $error) {

if ($error == UPLOAD_ERR_OK) {

$tmp_name = $_FILES["pictures"]["tmp_name"][$key];

$name = $_FILES["pictures"]["name"][$key];

move_uploaded_file($tmp_name, "C:\AppServ\www\images/$name");

echo "File";

echo " ";

echo $name;

echo " ";

echo "have been uploaded successfully";

}

}

?>

 

 

 

Paldies!

Edited by No0ne*
Link to comment
Share on other sites

×
×
  • Create New...