Nie obrażaj więc mojej inteligencji poprzez czynione na pokaz zaniżanie własnej.
<?php$file = $_FILES['userfile']['tmp_name'];if(!isset($file)){echo 'Wybierz zdjêcie';}else{$image_check = getimagesize($_FILES['userfile']['tmp_name']);if($image_check==false){echo 'Not a Valid Image';}else{$db = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=217.173.198.132) (PORT=1521))) (CONNECT_DATA=(SID=orcl)))";$conn = oci_connect("s81311", "s81311", $db);$image_name = "'test'";$lob = oci_new_descriptor($conn, OCI_D_LOB);$stmt = oci_parse($conn, "insert into bloby (clob_col, blob_col) values (EMPTY_CLOB(), EMPTY_BLOB()) returning blob_col into :blob_col");oci_bind_by_name($stmt, ':blob_col', $lob, -1, OCI_B_BLOB);//oci_bind_by_name($stmt, ':name', $image_name);//$sql = "INSERT INTO `BLOBY` (`clob_col`, `blob_col`) VALUES ('{$image_name}', '{$image}')";//$lob->writeTemporary($file);oci_execute($stmt, OCI_NO_AUTO_COMMIT);if ($lob->savefile($file)){oci_commit($conn);header("Location: index.php");die();}else{echo "Nie mo¿na za³adowaæ pliku\n";}$lob->free();oci_free_statement($stmt);oci_close($conn);}}
zanotowane.pldoc.pisz.plpdf.pisz.plalter.htw.pl