![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 305 Pomógł: 3 Dołączył: 4.08.2006 Skąd: GDA Ostrzeżenie: (0%) ![]() ![]() |
Witam,
Przedstawię kod jaki posiadam a potem opiszę problem. Kod <script language="JavaScript"> function deleteFileInput(hyperlink) { $(hyperlink).parent().remove(); return false; } function createFileInput(description, max) { var description = description ? true : false; var max = max ? max : false; var nextId = 0; var wrappers = $('.photoWrapper'); if (!max || wrappers.length < max) { wrappers.each(function (i) { var id = parseInt($(this).attr('id').replace('photoWrapper', '')); if (id >= nextId) { nextId = id + 1; } }); var p = $('<div>'); div.addClass('photoWrapper'); div.attr('id', 'photoWrapper' + nextId); var input = $('<input type="file" />'); input.addClass('file'); input.attr('name', 'photo[' + nextId + ']'); div.append(input); if (description) { div.html(p.html() + ' Opis '); var input = $('<input type="text" />'); input.addClass('text'); input.attr('name', 'photo_description[' + nextId + ']'); div.append(input); } var a = $('<a>'); a.addClass('foto'); a.attr('href', ''); a.html(' usuĹ?'); a.click(function () { return deleteFileInput(this); }); div.append(a); div.insertAfter($('.photoWrapper:last')); } return false; } </script> Teraz w pliku foto.php jest rozbudowany skrypt do uploadu fotek ale mój problem jest następujący jaką funkcją w php wszystkie fotki dodane za pomocą formularza obrobię przez ten jeden skrypt. Myślałem nad jakąś pętlą ale to chyba odpada ? Czy to tego typu zadania foreach będzie ok ? Proszę o pomoc (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 91 Pomógł: 13 Dołączył: 20.03.2007 Skąd: Bydgoszcz Ostrzeżenie: (0%) ![]() ![]() |
Pamietaj zeby wydluzyc max. okres wykonywania skryptu i mozliwy rozmiar wysylanych danych POST-em.
Opjce: - max_execution_time - post_max_size |
|
|
![]() ![]() |
![]() |
Aktualny czas: 5.10.2025 - 17:53 |