使用同一页面一次显示一百张图片一张图片 [英] Using The Same Page To Display A Hundred Pictures One Picture At A Time

查看:183
本文介绍了使用同一页面一次显示一百张图片一张图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要呈现一百多张照片。


创建和解析一系列图片是否切实可行

图片路径,等人使用服务器端脚本来实现这个目标吗?


我已经创建了一个数组,其中,HTML和Javascript
$ b目前使用的$ b对于四个不同的
页面中的每一个都是大约14KB,我开始处理的PHP页面已经超过35KB

大小(大部分是服务器)边处理创建

图片的数组。


我想做的是,只加载一次数组,并保持<加载
所以页面每次都不会重新创建数组,因此

最小化服务器端阵列的创建。


另外,我想我遇到了一些问题,即

javascript搞乱谷歌对页面的解析。


我不喜欢看到创建100个不同的html页面作为一个答案,

如果事情发生变化就会受到影响,这是一个很大的混乱,需要更新内容以及大部分内容和大量文件。 />
我是否错误地试图通过严格的HTML

页面来避免这样做?


页面存在于,它们代表游泳池设计

由Aquatic Creations所有者(北卡罗来纳州地下

游泳池设计师):


定制游泳池水功能
http://aquaticcreationsnc.com/lib/php/viewing0 .php

定制游泳池
http://aquaticcreationsnc.com/lib/php/viewing1.php

定制设计的水疗中心
http://aquaticcreationsnc.co m / lib / php / viewing2.php

自定义游泳池功能
http://aquaticcreationsnc.com/lib/php/viewing3.php

游泳池周围的石头和瓷砖
http://aquaticcreationsnc.com/lib/php/viewing4.php


有没有人对如何完成这样的

或追求指示有任何建议?


如果可以的话一看,并在

页面上发表评论,我也很欣赏建设性的批评。


非常感谢,


Jim Carlock

发布对新闻组的回复。

I have over a hundred pictures I would like to present.

Is it practical to create and parse an array of pictures,
picture paths, et al using server-side scripting to
accomplish this?

I created an array already, and whereby, the HTML and Javascript
currently used amount to about 14KB for each of four different
pages, the PHP page I started working on is already over 35KB in
size (most of it is server side processing creating the array of
pictures).

What I''d like to do, is load the array only one time, and keep that
loaded so the page doesn''t recreate the array each time, thus
minimizing the server side array creation.

Also, I think I''m running into some problems whereby the
javascript is messing up Google''s parsing of the page.

I don''t see creating 100 different html pages as an answer,
in the respect if something ever changes, that''s one big mess
to update and major portion of the content and alot of files.
Am I wrong in trying to avoid doing it via strictly HTML
pages?

The pages exist at, and they represent swimming pools designed
by the owner of Aquatic Creations (North Carolina In-Ground
Swimming Pool Designers):

Custom Swimming Pool Water Features
http://aquaticcreationsnc.com/lib/php/viewing0.php
Custom Designed Swimming Pools
http://aquaticcreationsnc.com/lib/php/viewing1.php
Custom Designed Spas
http://aquaticcreationsnc.com/lib/php/viewing2.php
Custom Swimming Pool Features
http://aquaticcreationsnc.com/lib/php/viewing3.php
Stone And Tile Around Swimming Pools
http://aquaticcreationsnc.com/lib/php/viewing4.php

Does anyone have any suggestions on how to accomplish such
or directions to pursue?

If you could take a look as well and provide comments on the
pages, I appreciate constructive criticism as well.

Thanks much,

Jim Carlock
Post replies to the newsgroup.

推荐答案

"我想做什么,只加载数组一次,并保持加载
,这样页面每次都不会重新创建数组,因此

最小化服务器端阵列的创建。


您是否考虑过使用会话?您可以使用它们轻松地创建阵列的临时缓存。


<?php

session_start() ;

if(!isset(
"What I''d like to do, is load the array only one time, and keep that
loaded so the page doesn''t recreate the array each time, thus
minimizing the server side array creation."

Have you considered using sessions? You could use them to create a
temporary cache of the array quite easily.

<?php
session_start();
if (!isset(


_SESSION [''array_cache''])){
_SESSION[''array_cache''])) {


array = array(''value'',''value'');
array = array(''value'', ''value'');


这篇关于使用同一页面一次显示一百张图片一张图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆