我有6个php页面,所有这些都可以在PC和主机上完美运行。除了一个,我的search.php不能在主机上工作(顺便说一下,它也适用于PC)。不知怎的,当我尝试运行search.php我甚至没有得到错误,只有我得到的是白色屏幕。在这里我的代码;
<?php
session_start();
if(!$_SESSION['auth'])
{
echo 'bu sayfaya erişim izniniz yok.';
header("Location: uyegirisi.html");
}
?>
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>First try</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<style>
li
{
display: inline;
padding: 0px 20px 0px 20px;
}
ul
{
padding:10px;
background: rgba(0,0,0,0.5);
}
a
{
color: black;
font-size: 30px;
}
p
{
color: #0f0f0f;
font-size: 24px;
font-family: Helvetica;
}
.bor
{
font-size: 23px;
border:2px;
}
.hr
{
color : #0000F8;
size : 4;
}
</style>
</head>
<body>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4" align="center">
<header>
<ul>
<li><a href="musterikayit.html">Kayıt ekranı</a></li>
<li><a href="logout.php"> Çıkış Yap</a></li>
</ul>
</header>
<form action="musteriarama.php" method="get">
<div class="hiza">
<label for="Arama"></label>
<input type="text" class="form-control" id="Arama" name="Arama">
</br>
</br>
<input class="but btn btn-primary btn-lg" type="submit" name="gonder" value="Müşteri Ara">
</div>
</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>
<?php
$db =new mysqli('localhost', 'root', '' , 'musteritakip');
if($db->connect_errno) die ('Bağlantı hatası:' . $db->connect_errno);
if(isset($_GET['gonder'])){
#Ekleme işlemi
$stmt = $db ->prepare("select * from musteri_bilgileri where (isim like ?)");
if($stmt === FALSE) die("Sorgu hatası". $db ->error);
$ara ='%'.$_GET['Arama'].'%';
$stmt->bind_param("s", $ara);
$stmt->execute();
$sonuc =$stmt->get_result();
if($sonuc -> num_rows <1) die("<p>"."bulunamadı");
while ($row = $sonuc->fetch_array())
{
echo '<div>';
echo '<p>'.$row['isim'];
echo '   ';
echo $row['soyad'];
echo '        ';
echo '<form action="detaylar.php" method="post">';
echo'<input type="hidden" value="'.$row['id'].'" name="gelenid">';
echo '<input type ="submit" value="Detaylar" style="margin-bottom:-35px;" name="detaylargonder"></input>';
echo '<hr width="100%" >';
echo '</form>';
echo '</br>';
echo '</br>';
echo '</div>';
}
}
?>
答案 0 :(得分:-1)
您上传时一定错过了什么。你没有清楚地描述什么不起作用或错误,我们只能建议你。按照以下步骤解决你的问题: