当我在apache上运行此代码时,我的代码工作正常。但是当我在iis上实现它时,它不起作用

时间:2016-02-01 05:10:42

标签: php apache iis

<?php

    session_start();
    include "../../lib/mssql.connect.php";


    $params = array($_POST['id']);

    $sql = "SELECT * FROM adminIP WHERE id = ?";

         //run the query
         $result = sqlsrv_query($conn, $sql,$params);

         while($row = sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC))
            {
                $id[] = array('id' =>$row['id']);
                $name[] = array('adminname' =>$row['adminName']);
                $ip[] = array('adminip' =>$row['adminIP']);
            }

            ?>      
            <form method = "post" action="">
            <div class="col-lg-10">

 <label class="col-lg-2 control-label">Name</label>
                                    <div class="col-lg-10">
                                    <input type="text" class="form-control" id="txtname" value="<? echo implode(",", $name[0]) ?>" disabled="">
</div>                                  <br/>
                                    <label class="col-lg-2 control-label">IP</label>
                                    <div class="col-lg-10">
                                    <input type="text" class="form-control" id="txtip" value="<? echo implode(",", $ip[0]) ?>" data-content="Please enter your IP Address" data-container="body" data-toggle="popover" data-placement="bottom">
                                    </div>

                                    <div class="col-lg-10">
                                    <input type="text" class="form-control" id="txtid" value="<? echo implode(",", $id[0]) ?>"style="display: none">
                                    </div>
                            </div>  
            </form>
            <?php
            ?>

0 个答案:

没有答案