2017-02-16 49 views
-2

我在我的代碼中發現一個解析錯誤試圖找到但沒有可能爲我請幫忙找出這個錯誤。我找到一個解析錯誤

<?php 
//allow sessions to be passed so we can see if the user is logged in 
session_start(); 
if(isset($_SESSION['uid'])){ 


include "./db.php"; 
//connect to the database so we can check, edit, or insert data to our users table 
$con = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die(mysqli_connect_errno()); 
//$db = mysql_select_db(DB_NAME, $con) or die(mysql_error()); 

//include out functions file giving us access to the protect() function made earlier 
include "./functions.php"; 
include('header.php'); 
include "./loadmore.php"; 
?> 

<style type="text/css"> 
body { 
font: normal 13px arial,sans-serif; 
} 
.email_list{ 
margin-bottom:20px; 
} 
div.list_item { 
border-left: 4px solid #7ad03a; 
padding: 1px 12px; 
background-color:#F1F1F1; 
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); 
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); 
} 
div.list_item { 
margin: 5px 15px 2px; 
} 
div.list_item p { 
margin: .5em 0; 
padding: 2px; 
font-size: 13px; 
line-height: 1.5; 
} 
.list_item a { 
text-decoration: none; 
padding-bottom: 2px; 
color: #0074a2; 
-webkit-transition-property: border,background,color; 
transition-property: border,background,color;-webkit-transition-duration: .05s; 
transition-duration: .05s; 
-webkit-transition-timing-function: ease-in-out; 
transition-timing-function: ease-in-out; 
} 
.list_item a:hover{ 
text-decoration:underline; 
} 
.show_more_main { 
margin: 15px 25px; 
} 
.show_more { 
background-color: #f8f8f8; 
background-image: -webkit-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%); 
background-image: linear-gradient(top,#fcfcfc 0,#f8f8f8 100%); 
border: 1px solid; 
border-color: #d3d3d3; 
color: #333; 
font-size: 12px; 
outline: 0; 
} 
.show_more { 
cursor: pointer; 
display: block; 
padding: 10px 0; 
text-align: center; 
font-weight:bold; 
} 
.loding { 
background-color: #e9e9e9; 
border: 1px solid; 
border-color: #c6c6c6; 
color: #333; 
font-size: 12px; 
display: block; 
text-align: center; 
padding: 10px 0; 
outline: 0; 
font-weight:bold; 
} 
.loding_txt { 
background-image: url(loading_16.gif); 
background-position: left; 
background-repeat: no-repeat; 
border: 0; 
display: inline-block; 
height: 16px; 
padding-left: 20px; 
} 

</style> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> 
<script type="text/javascript"> 
$(document).ready(function(){ 
    $(document).on('click','.show_more',function(){ 
     var ID = $(this).attr('id'); 
     $('.show_more').hide(); 
     $('.loding').show(); 
     $.ajax({ 
      type:'POST', 
      url:'ajax_more.php', 
      data:'id='+ID, 
      success:function(html){ 
       $('#show_more_main'+ID).remove(); 
       $('.tutorial_list').append(html); 
      } 
     }); 

    }); 
}); 
</script> 

      <div> 
       <ul class="breadcrumb"> 
        <li> 
         <a href="#">Home</a> <span class="divider">/</span> 
        </li> 
        <li> 
         <a href="#">E-mails </a> 
        </li> 
       </ul> 
      </div> 

      <div class="row-fluid sortable">  
       <div class="box span12"> 
        <div class="box-header well" data-original-title> 
         <h2>Get Active Emails List</h2> 
         <div class="box-icon"> 
          <a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a> 
          <a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a> 
         </div> 
        </div> 
        <div class="box-content"> 
         <table class="table table-striped table-bordered "> 
           <thead> 
            <tr> 
             <th>Emails</th> 
            </tr> 
           </thead> 
           <tbody> 
            <?php getActiveSendListEmails($con);?> 

           </tbody> 
         </table> 
         <?php 
         //get rows query 
          $query = mysqli_query($con, "SELECT * FROM emails where status=1 ORDER BY id DESC LIMIT 25"); 

         //number of rows 
          $rowCount = mysqli_num_rows($query); 

         if($rowCount > 0){ 
          while($row = mysqli_fetch_assoc($query)){ 
           $tutorial_id =  $row['id']; 
           ?> } 
           <?php 
         // line number 162 is most culprit line but i am not getting what shoud do.. 
<div class="show_more_main" id="show_more_main <?php getActiveSendListEmails($con); ?> "> 
             //<span id="<?php echo getActiveSendListEmails($con); ?>" class="show_more" title="Load more posts">Show more</span> 
            <span class="loding" style="display: none;"><span class="loding_txt">Loading...</span></span> 
           </div> 
         ?> } 
        </div> 


       </div><!--/span--> 
       </div> 



<?php include('footer.php');} else 
{ 
echo 'Not authorised.... <a href="login.php">Login</a>'; 
} ?> 

t重定向但不給我我的結果。我做對了嗎?我得到inout並與數據庫中的可用名稱匹配,然後我正在提取數組,然後我將它分配給會話。比顯示回來。我做對了嗎? -

+0

什麼錯誤?聲明並格式化你的代碼。它似乎打破了 –

+0

簽出您的PHP錯誤日誌/命令行輸出/調試器輸出來獲取您的解析錯誤的位置。或者至少一條錯誤消息,並用該信息更新您的問題。 – DBX12

+0

很多php打開標籤的錯誤,並關閉這樣的標籤*?>} <?php * – JYoThI

回答

0

你的代碼有很多錯誤。第一:

?> } <?php // line number 162 is most culprit line but i am not getting what shoud do..

還有這一個

"> //" class="show_more" title="Load more posts">Show more Loading... ?> }

你似乎被關閉你的php括號的PHP代碼塊之外來代替。

我們甚至不知道你的線162是什麼樣的。

修復那些行然後你可能會修復你的代碼。

相關問題