1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?php include("../_private/conectar.php"); include "upload.class.php"; $ds = DIRECTORY_SEPARATOR; //1 $id_cont= $_POST['id_cont']; $pasta= $_POST['pastas'].'/'; $storeFolder = '../userfiles/galeria/'.$pasta; //2 if (!empty($_FILES)) { $upload = new Upload($_FILES['file'], 1000, 800, $storeFolder); $nomearq= $upload->salvar();
/* $tempFile = $_FILES['file']['tmp_name']; //3 $targetPath = dirname( __FILE__ ) . $ds. $storeFolder . $ds; //4 $targetFile = $targetPath. $_FILES['file']['name']; //5 move_uploaded_file($tempFile,$targetFile); //6*/ $query = mysql_query("INSERT INTO foto_galeria VALUES('','$id_cont','".$nomearq."','','".$pasta."')") or die ("erro ao selecionar a tabela"); } ?>
|