IIS 8没有运行嵌入式javascript

时间:2015-08-31 12:08:53

标签: javascript iis-8

你能帮忙吗?

我的母版页上有JavaScript代码,在visual studio中正常工作,并且在另一台生产服务器上运行正常。但是它不能在新服务器上运行(在IIS8中)。

代码示例

<?php
    include("../includes/header.php");
    require('../../mysqli_connect.php');
    include("../functions/filter_time.php");

    // query the database
    $query = "SELECT * FROM projects_underground, underground, projects
            LEFT JOIN river ON projects.river_id=river.river_id 
            LEFT JOIN dlr ON projects.dlr_id=dlr.dlr_id 
            LEFT JOIN overground ON projects.overground_id=overground.overground_id 
            LEFT JOIN natrail ON projects.natrail_id=natrail.natrail_id 
            LEFT JOIN tram ON projects.tram_id=tram.tram_id

            WHERE 
            projects_underground.underground_fk = underground.underground_id AND
            projects_underground.projects_fk = projects.projects_id AND
            name = 'Imperial War Museum'";

    $result = mysqli_query($dbc, $query); // put queried result into variable
    $row = mysqli_fetch_assoc($result); // put that into seperate arrays called $row
    $ug = mysqli_fetch_array($result);

    while ($ug = mysqli_fetch_array($result)) {
        echo $ug['underground_name'];
    }
?>

我已经为IUSR和IIS_IUSRS用户的Application文件夹设置了权限。我将不胜感激。

谢谢,

1 个答案:

答案 0 :(得分:0)

你没有加载jquery。尝试将此脚本添加到开头。

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>