我在我的代码中发现了一个解析错误试图找到但是对我来说没有什么是可能的,请帮助找出这个错误。
<?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>';
} ?>
重定向,但没有回复我的结果。我做得对吗我正在进入并将其与数据库中的可用名称匹配,然后我将获取数组,之后我将其分配给会话。而不是显示回来。我做得对吗? -
答案 0 :(得分: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行是什么样的。
修复这些行,然后您可能已修复代码。