DST Posted November 21, 2010 Report Share Posted November 21, 2010 Problēma ir tāda iepriekšējo reiz šitas viss gāja tgt ņifiga bildi uploado bet neinserto <?php $uploaddir = './uploads/'; $file = $uploaddir . basename($_FILES['uploadfile']['name']); $size=$_FILES['uploadfile']['size']; if($size>1048576) { echo "error file size > 1 MB"; unlink($_FILES['uploadfile']['tmp_name']); exit; } if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)) { mysql_query('INSERT INTO `minigame`.`mg_albums_images` (`bilde`, `album_id`, `dir`) VALUES (\'$file\', \'asfsdf\', \'asdfsdf\')') or die(mysql_error()); } else { echo "error ".$_FILES['uploadfile']['error']." --- ".$_FILES['uploadfile']['tmp_name']." %%% ".$file."($size)"; } ?> Link to comment Share on other sites More sharing options...
Kavacky Posted November 21, 2010 Report Share Posted November 21, 2010 Un kļūdas kādas? Link to comment Share on other sites More sharing options...
X ID Posted November 22, 2010 Report Share Posted November 22, 2010 Neinserto vai inserto bildes nosaukumu kā stringu $file, nevis mainīgā $file vērtību? Šajā gadījumā problēma ir pēdiņās: $b = 'b'; echo 'a $b c'; // a $b c echo "a $b c" // a b c Link to comment Share on other sites More sharing options...
DST Posted November 22, 2010 Author Report Share Posted November 22, 2010 kļudas nav. un viņš vsp neisūta nevienu datu. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now