ziedinjsh Posted February 21, 2011 Report Share Posted February 21, 2011 Labs vakars! Vai kāds varētu pateikt vai kkur ir pieejams multiple file uploads kurš pievieno bildes nosaukumu arī iekš mysql!? Paredzēts prekš lietotāju galerijas, bet nu vnk nemaz nesaprotu ar ko sākt! Paldies jau iepriekš! :) Quote Link to comment Share on other sites More sharing options...
mounkuls Posted February 21, 2011 Report Share Posted February 21, 2011 -katram failam, kad norādi/pievieno(postforma) ir jābūt atšķirīgam lauka nosaukumam. -katru no tiem failiem ciklā laižot ir gan jāsaglabā uz servera gan tā faila identifikātors un ceļš uz failu bāzē. Tas kā minimums, tad jau var ko tālāk. /man gan liekas, ka šādas problēmas ir risinātas arī agrāk/ Quote Link to comment Share on other sites More sharing options...
Val Posted February 21, 2011 Report Share Posted February 21, 2011 (edited) http://code.google.com/p/swfupload/ Saņemtos datus gan pašam jāizdomā, kur un kā saglabāt. Labā feja to neizdarīs. Edited February 21, 2011 by Val Quote Link to comment Share on other sites More sharing options...
Kemito Posted February 22, 2011 Report Share Posted February 22, 2011 Ieskatu, kas tas par kukaini varam atrast - http://w3schools.com/php/php_file_upload.asp Quote Link to comment Share on other sites More sharing options...
rpr Posted February 22, 2011 Report Share Posted February 22, 2011 man fancyupload itkā iepatikās, bet itkā neko vairāk arī neesmu izmantojis. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted February 22, 2011 Report Share Posted February 22, 2011 http://plupload.com/ Quote Link to comment Share on other sites More sharing options...
labaiss Posted February 22, 2011 Report Share Posted February 22, 2011 http://plupload.com/ šis laikam ir viens no drošākajiem variantiem, kādu esmu redzējis (baigi jau nēsmu meklējis, bet...) Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted February 22, 2011 Report Share Posted February 22, 2011 http://www.webappers.com/category/components/upload/ Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted February 22, 2011 Author Report Share Posted February 22, 2011 tātad, vairāk vai mazāk ir šādi.. lapa kur izvēlas failus: <?php echo "<form id='file_upload' action='fcs/upload2.php' method='POST' enctype='multipart/form-data'> <input type='file' name='file' multiple> <button>Upload</button> <div>Upload files</div> </form> <table id='files'></table>"; ?> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script> <script src="js/jquery.fileupload.js"></script> <script src="js/jquery.fileupload-ui.js"></script> <script> /*global $ */ $(function () { $('#file_upload').fileUploadUI({ uploadTable: $('#files'), downloadTable: $('#files'), buildUploadRow: function (files, index) { return $('<tr><td>' + files[index].name + '<\/td>' + '<td class="file_upload_progress"><div><\/div><\/td>' + '<td class="file_upload_cancel">' + '<button class="ui-state-default ui-corner-all" title="Cancel">' + '<span class="ui-icon ui-icon-cancel">Cancel<\/span>' + '<\/button><\/td><\/tr>'); }, buildDownloadRow: function (file) { return $('<tr><td>' + file.name + '<\/td><\/tr>'); } }); }); </script> un šis ir upload: <?php session_start(); include ("dbase.php"); $data = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE user_email='".$_SESSION['user_email']."' LIMIT 1")); $destination_path = "gallery/"; $file = $_FILES['file']; $user = $data['user_name']."_"; $gallery = $destination_path .$user. basename( $file['file']['name']); move_uploaded_file($file['file']['tmp_name'], $gallery); ?> bet nu kā jau nojaušat man failus nepārvieto uz folderi. 100% ka kautkas nav kārtībā.. bet uz sitienu nevaru iebraukt kas!? Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted February 22, 2011 Report Share Posted February 22, 2011 Es teiktu, ka problēma ir starp krēslu un klaviatūru. Iemācies tak pats vienreiz labot savu kodu. Ja nepārvieto uz folderi, tad pārbaudi vai vispār ir ko pārvietot. Vai ceļš uz folderi, kur pārvieto, ir pareizs, vai ir atļaujas tur kaut ko pārvietot. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.