加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – 包含jQuery时的空白页面

发布时间:2020-12-13 17:40:32 所属栏目:PHP教程 来源:网络整理
导读:我正在尝试在我的 PHP脚本中添加一个jQuery.除了添加jQuery脚本外,一切顺利.然后该页面变为空白. 这是我的代码: function site_header() { echo "html dir="rtl" !DOCTYPE HTML html head meta name="viewport" content="width=device-width; initial-
我正在尝试在我的 PHP脚本中添加一个jQuery.除了添加jQuery脚本外,一切顺利.然后该页面变为空白.

这是我的代码:

function site_header() {
    echo "<html dir="rtl"> 
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta name="viewport" content="width=device-width; initial-
        scale=1.0; maximum-scale=1.0;">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Arabsfun :: ????? ?????</title>
    <link href="css/style.css" type="text/css" rel="stylesheet">";

    echo Pulse::css(); 
    echo Pulse::javascript(); 
    echo "</head>
<body>
    <div id="wrap">     
        <div class="header">
            <div class="logo">
                <a href="index.php"><img src="images/logo.png" alt="Arabsfun" /></a>
            </div>
            <div class="clear-float">
            </div><br>
        </div> 
    <div class="content">" . navbar() ." </div>
        </center>" ;
}

然后我使用函数site_header()来启动页面上的标题.

有关如何解决这个问题的任何想法?

解决方法

我根本没有在该代码中看到任何对jQuery的引用.我打算假设你键入的内容如下:

<link href="css/style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="jquery.js">

你需要一个结束< / script>否则整个页面将被视为脚本,不会发出任何内容.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读