PHP, производящий файловые вложения с заголовками

Я нашел решение, которое отлично работает для меня. каждые полсекунды перезагружается макет экземпляра каменной кладки.

//initialization of a masonry object:

var msnry = new Masonry("#container",{
itemSelector: '#post',
gutter: 15
}); 

//thread that makes the magic happens:

setInterval(function(){
msnry.reloadItems();
msnry.layout();
},500);

Таким образом, вы можете добавлять вещи, используя ajax, и вуаля, есть макет кладки.

5
задан OneNerd 22 May 2009 в 03:19
поделиться

2 ответа

Ok, I figured it out.

The script above DOES work.

What was happening is I had a series of include_once files, and one of them had a blank line causing the issue.

4
ответ дан 14 December 2019 в 13:45
поделиться

Not sure if this is the real answer, but I think you intended

header('Content-Type: ' . $mimeType);

to be

header('Content-Type: ' . $mimeTypes[$mimeType]);
2
ответ дан 14 December 2019 в 13:45
поделиться
Другие вопросы по тегам:

Похожие вопросы: