Javascript 我修改了PHP代码,但浏览器中显示的结果没有改变。是不是有什么“什么”呢;“缓存”;PHP中的bug?
这些天我在学习AJAX,下面是我的html代码:Javascript 我修改了PHP代码,但浏览器中显示的结果没有改变。是不是有什么“什么”呢;“缓存”;PHP中的bug?,javascript,php,ajax,Javascript,Php,Ajax,这些天我在学习AJAX,下面是我的html代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Rob's Ro
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Rob's Rock 'n' Roll Memorabilia</title>
<link rel="stylesheet" href="css/default.css"/>
<script type="text/javascript" src="scripts/thumbnails.js"></script>
</head>
<body>
<div id="wrapper">
<img src="images/logotypeLeft.png" alt="Rob's Rock 'n' Roll Memorabilia"
width="394" height="91" id="logotypeLeft"/>
<img src="images/logotypeRight.png" alt="Rob's Rock 'n' Roll Memorabilia"
width="415" height="92" id="logotypeRight"/>
<div id="introPane">
<p>Are you looking for the perfect gift for the rock fan in your life?
Maybe you want a guitar with some history behind it, or a conversation
piece for your next big shindig. Look no further! Here you'll find all
sorts of great memorabilia from the golden age of rock and roll.</p>
<p><strong>Click on an image to the left for more details.</strong></p>
</div>
<div id="thumbnailPane">
<img src="images/itemGuitar.jpg" width="301" height="105" alt="guitar"
title="itemGuitar" id="itemGuitar"/>
<img src="images/itemShades.jpg" alt="sunglasses" width="301" height="88"
title="itemShades" id="itemShades"/>
<img src="images/itemCowbell.jpg" alt="cowbell" width="301" height="126"
title="itemCowbell" id="itemCowbell"/>
<img src="images/itemHat.jpg" alt="hat" width="300" height="152"
title="itemHat" id="itemHat"/>
</div>
<div id="detailsPane">
<img src="images/blank-detail.jpg" width="346" height="153" id="itemDetail"/>
<div id="description"></div>
</div>
</div>
</body>
</html>
罗布的摇滚纪念品
你在为你生活中的摇滚迷寻找完美的礼物吗?
也许你想要一把有历史背景的吉他,或者一段对话
为你的下一个大型聚会准备一块。别再看了!在这里你会找到所有的
摇滚乐黄金时代的大事记
单击左侧的图像了解更多详细信息。
这是我的缩略图.js:
/**
*由Czyhandsome于2015/10/20创建。
*/
window.onload=initPage;
var request=createRequest();
函数initPage(){
var thumbs=document.getElementById(“thumbnailPane”).getElementsByTagName(“img”);
对于(变量i=0;i
以下是我的getDetail.php:
当我切换到一个新服务器时,我为此挣扎了一段时间。你可以用
opcache_reset();
我在开发环境中对每个php文件进行编码时都会用到它
当您第一次将其添加到php文件时,缓存重置大约需要五分钟。您是否尝试过清除缓存?可能是缓存问题,请尝试清除缓存或使用igcognito Mode。您确定已上载新代码。在长时间的会话之后,我犯了这样的错误…缓存驻留在服务器端,清除浏览器的缓存不会纠正问题。
<?php
$details = array (
'itemGuitar' => "<p>Pete Townshend once played this guitar while his own axe was in the shop having bits of drumkit removed from it.</p>",
'itemShades' => "<p>Yoko Ono's sunglasses. While perhaps not valued much by Beatles fans, this pair is rumored to have been licked by John Lennon.</p>",
'itemCowbell' => "<p>Remember the famous \"more cowbell\" skit from Saturday Night Live? Well, this is the actual cowbell.</p>",
'itemHat' => "<p>Michael Jackson's hat, as worn in the \"Billie Jean\" video. Not really rock memorabilia, but it smells better than Slash's tophat.</p>"
);
echo $details[$_REQUEST['ImageID']];
?>
opcache_reset();