Частый гость
Покинул форум
Сообщений всего: 192
Дата рег-ции: Июль 2015
Помог: 0 раз(а)
|
armancho7777777
я в апаче не понимаю вообще, можете объяснить что это за правила в .htaccess?
вот мои заголовки
CODE ( htmlphp):
скопировать код в буфер обмена
показать исходный код Accept-Ranges bytes Connection close Content-Length 1851 Content-Type text/html Sat, 04 Jul 2015 08:31:26 GMT Etag "73b-519ae82d9ba61" Last-Modified Mon, 29 Jun 2015 21:09:53 GMT Server Apache/2.4.12 (Ubuntu) показать исходный код Accept application/json, text/javascript, */*; q=0.01 Accept-Encoding gzip, deflate Accept-Language ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3 Content-Length 297146 Content-Type multipart/form-data; boundary=---------------------------146972237322214 Cookie _ga=GA1.2.536328012.1433533603 Host lopushansky.com Referer http://lopushansky.com/jQuery-File-Upload-9.10.1/basic-plus.html User-Agent Mozilla/5.0 (Windows NT 6.2; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0 X-Requested-With XMLHttpRequest
(Добавление)
если я через самописную структуру аякса обращаюсь то ответ от сервера положительный
CODE ( javascript):
скопировать код в буфер обмена
$.ajax({ type: "POST", dataType: 'json', url: "server/php/index.php", data: {id_art:id_art}, cache: false, success: function(data){ console.log(data) } })
а если через uploadhandler то 500 ошибка
CODE ( htmlphp):
скопировать код в буфер обмена
$(function () { 'use strict'; // Change this to the location of your server-side upload handler: var url = 'server/php/index.php', uploadButton = $('<button/>') .addClass('btn btn-primary') .prop('disabled', true) .text('Processing...') .on('click', function () { var $this = $(this), data = $this.data(); $this .off('click') .text('Abort') .on('click', function () { $this.remove(); data.abort(); }); data.submit().always(function () { $this.remove(); }); }); $('#fileupload').fileupload({ url: url, dataType: 'json', autoUpload: false, acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, maxFileSize: 999000, disableImageResize: /Android(?!.*Chrome)|Opera/ .test(window.navigator.userAgent), previewMaxWidth: 100, previewMaxHeight: 100, previewCrop: true }).on('fileuploadadd', function (e, data) { data.context = $('<div/>').appendTo('#files'); $.each(data.files, function (index, file) { var node = $('<p/>') .append($('<span/>').text(file.name)); if (!index) { node .append('<br>') .append(uploadButton.clone(true).data(data)); } node.appendTo(data.context); }); }).on('fileuploadprocessalways', function (e, data) { var index = data.index, file = data.files[index], node = $(data.context.children()[index]); if (file.preview) { node .prepend('<br>') .prepend(file.preview); } if (file.error) { node .append('<br>') .append($('<span class="text-danger"/>').text(file.error)); } if (index + 1 === data.files.length) { data.context.find('button') .text('Upload') .prop('disabled', !!data.files.error); } }).on('fileuploadprogressall', function (e, data) { var progress = parseInt(data.loaded / data.total * 100, 10); $('#progress .progress-bar').css( 'width', progress + '%' ); }).on('fileuploadfail', function (e, data) { console.log(data) $.each(data.files, function (index) { var error = $('<span class="text-danger"/>').text('File upload failed.'); $(data.context.children()[index]) .append('<br>') .append(error); }); }).prop('disabled', !$.support.fileInput) .parent().addClass($.support.fileInput ? undefined : 'disabled'); });
Я так понимаю js только запрашивает, неужели он по разному запрашивает сервер, да и ошибка то серверная она либо есть либо нет?
(Добавление)
Ts.Saltan пишет:imedia пишет:(index.php|images|robots.txt|jQuery-File-Upload-9.10.1|pu
В чем тут дело вообще
Возможно в том, что точки надо экранировать \.
да извините, но экранирование дела не поменяло(Отредактировано автором: 04 Июля, 2015 - 11:48:02)
|