开发者

Load/Run "<php require...file.php..." After Rest of Page Has Loaded

On my website I have a image rotator. The page takes some time, it varies on how many pictures are in the slide show, to load the pictures. This delays the page and it takes more time to appear. After the page is finished loading how would I then be able to run this script? That way they could see the page, and then seconds later have this image rotator appear. The image rotator is not necessary so it's fine if it does not show up right away.

<php require(DIR开发者_运维技巧_WS_INCLUDES . 'slideshow.php'); ?>

I'll take any language, php, javascript or jquery, or ajax. I do not know ajax so if would be helpful if the answer was in one of the first two languages.

Thanks, Luc


PHP won't be a good solution for this - the whole PHP page will have been executed by the time the page is shown to the user.

Instead, you might look at JavaScript solutions - searching for JavaScript image carousel or rotator should lead you to many popular methods and libraries.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜