[ヘルプ] この jQuery は html サフィックス ファイルでは使用できますが、php サフィックス ファイルでは使用できません。

WBOY
リリース: 2016-06-23 14:13:42
オリジナル
1343 人が閲覧しました

PHP jQuery HTML

初心者が専門家に質問したいのですが、なぜこのページは html サフィックス ファイルでは利用できるのに、php サフィックス ファイルでは利用できないのですか?
<!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><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><link rel='stylesheet' id='foundation-css'  href='foundation.css' type='text/css' media='all' /><link rel='stylesheet' id='style-css'  href='style.css' type='text/css' media='all' /><script type='text/javascript' src='jquery.js?=1.7.2'></script><script type='text/javascript' src='jquery.isotope.min.js'></script><script type='text/javascript' language="javascript">function loadCiphpImage(){	var $ = jQuery.noConflict();  	var h = Math.max( $("#content-container").height() , $("#sidebar").innerHeight());	$('#wall_background, #wall_background .overlay, #wall_container').height(h);	if ( $('#wall_container .wall_cell').length > 0 )	{		var $container = $('#wall_container');		function update_wall()		{			var c_width = $container.width();			// Nb columns - 240			var nb = Math.floor(c_width / 240);			// Element Width			var width = c_width / nb ;			var x,y;			$('#wall_container .wall_cell').each(function(id){				// x = ( (nb - (id%nb)) -1 ) * width;				x = (id % nb) * width;				y = id == 0 ? 0 : Math.floor(id/nb) * width;				$(this).css('width',width+'px').css('opacity',1).css('height',width+'px').css('left',x).css('top',y);			});						if ( $('#wall_container').height() < (y + width))			{				$('#wall_background, #wall_background .overlay, #wall_container').height( y + width );			}						setTimeout('adjustBackgroundHeight()',800);		}		$(window).smartresize(update_wall);		$(window).ready(update_wall);	}}</script></head><body>	<div id="container" class="container" role="document">		<div id="sidebar">13</div>	<div id="wall_background">		<div id="wall_container">			<div class="wall_cell" style="opacity:0"><img src="Talk-3.jpg" /><div class="overlay-custom" style="background:rgba(40,158,255,0.70)" onClick="location.href=('#')">								<div class="overlay-text">									<p><a href="#">观点</a></p>									<p class="subtitle"></p>								</div>							  </div>		  </div><div class="wall_cell" style="opacity:0"><img src="Shirt.jpg" /><div class="overlay-custom" style="background:rgba(40,158,255,0.70)" onClick="location.href=('#')">								<div class="overlay-text">									<p><a href="#">购买优惠</a></p>									<p class="subtitle"></p>								</div>							  </div>							</div><div class="wall_cell" style="opacity:0"><img src="Review.jpg" /><div class="overlay-custom" style="background:rgba(40,158,255,0.70)" onClick="location.href=('#')">								<div class="overlay-text">									<p><a href="#">测评</a></p>									<p class="subtitle"></p>								</div>							  </div>							</div><div class="wall_cell" style="opacity:0"><img src="One_Review.jpg" /><div class="overlay-custom" style="background:rgba(40,158,255,0.70)" onClick="location.href=('#')">								<div class="overlay-text">									<p><a href="#">测评</a></p>									<p class="subtitle"></p>								</div>							  </div>							</div>	  </div>	  </div></div>	<div id="content" role="main">		<script type="text/javascript">				jQuery(window).ready(function(){			loadCiphpImage();		});		</script>	</div></body></html>
ログイン後にコピー

ディスカッションに返信(解決策)

コードは上記のphpファイルのコードと同じですか?何かエラーを報告しましたか?

さて、コードは上記のとおりで、エラーはありません。たとえば、123.html という名前のファイルは使用できますが、123.php に変更すると使用できなくなります。 php ステートメントなしで static にしても問題ありませんが、接尾辞を php に変更すると機能しません...

通常、PHP は HTML に埋め込まれた言語ですが、これは何ですか?

通常の状況では、このような状況は起こりません。PHP は HTML に埋め込まれた言語ですが、

人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!