php 소스문의 드립니다.
본문
안녕하세요 php소스질문좀 드리겠씁니다.
서버이전후 잘나온게 안나와서 문의 드립니다
서버이전후 리스트 페이지 부분이 사진과 같이 주석처리가 되는데 왜그런걸까요 ㅠㅠ?
리스트 페이지
<?
$ca_id = $_GET['ca_id'];
if($ca_id=="3010" || $ca_id=="3010") {
include "../theme/basic/skin/shop/basic/cate/cate_1_1.php";
}
?>
<?php
$where2 = array();
for($i=0; $i<count($_GET['qs']); $i++) {
$where2[] = " binary(it_basic) like '%".$_GET['qs'][$i]."%' ";
}
if(count($_GET['qs'])!="0") { $sql_where2 = " and (" . implode(" or ", $where2).") "; }
$sql = " select count(*) as cnt from {$g5['g5_shop_item_table']} where 1=1 ".$sql_where2." and ( ca_id like '".$_GET['ca_id']."%' or ca_id2 like '".$_GET['ca_id']."%' or ca_id3 like '".$_GET['ca_id']."%' ) ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
//echo $sql;
?>
<div class="list_tx">
<?php echo get_text($g5['title']); ?>
</div>
<style>
input[type="checkbox"] {width: 16px; height: 16px;}
.list_tx { text-align: center;
font-family: 'Noto Sans KR', sans-serif;
font-size: 30px;
font-weight: bold;
padding-top: 45px;
padding-bottom: 45px;}
/* 조건 검색 */
.s_menu { }
.s_menu li {float:left;width: 240px; padding: 0px 10px 0px 20px; border-right:1px solid #e3e3e3; height: 100%;}
.s_menu .ri_co li:nth-child(5) { border-right:0px solid #e3e3e3;padding:65px 0px 65px 25px;}
.s_menu_title strong{
font-size:13px;
font-weight:bold;
color:#000;
}
.s_menu_co {background: #f4f4f4;
width: 1200px;
height: 50px;
border-top: 1px solid #bbb;
text-align: center;
line-height: 50px;font-family: 'Noto Sans KR', sans-serif; font-size: 20px;font-weight:bold;}
.s_menu_option{ width: 1200px;height:300px;font-family: 'Noto Sans KR', sans-serif;background: #f4f4f4;padding: 30px 30px 30px 30px;border-bottom: 1px solid #bbb;border-top: 1px solid #e3e3e3; margin-bottom: 80px;}
.ri_co {font-family: 'Noto Sans KR', sans-serif;color:#333; text-align: center; margin-top: 60px;}
.ri_co p {color:#333; font-size: 20px;font-weight:400;font-family: 'Noto Sans KR', sans-serif;}
.ri_co h3 {color:#333; font-size: 26px;font-weight:500;margin-top: 20px;font-family: 'Noto Sans KR', sans-serif;}
.menu_option > h4{font-family: 'Noto Sans KR', sans-serif;
color:#333;
font-size: 18px;
margin-bottom:25px;
}
.menu_option > ul > ol{
width:100%;
height:35px;
text-align: left;
padding: 0;
}
.menu_option_sub > ul > ol{
display:inolne-block;
width:160px;
height:24px;
}
.op_butn{
float:right;
padding:2px 15px;
cursor:pointer;
}
.cname { padding-left: 10px;font-family: 'Noto Sans KR', sans-serif;
font-size: 16px;color: #6B6B6B;font-weight: 300;}
/* 상품 목록 스킨 10 */
</style>
<form action="./list.php" method="GET">
<div class="s_menu"><!-- 조건 검색 -->
<div class="s_menu_co">조건검색</div>
<ul class="s_menu_option">
<li class="menu_option" style="width:180px;" >
<h4><span>카테고리</span></h4>
<ul>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "그램") { echo "checked"; }} ?> name="qs[]" value="그램"/><span class="cname">그램</span></ol>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "울트라북") { echo "checked"; }} ?> name="qs[]" value="울트라북"/><span class="cname">울트라북</span></ol>
</ul>
</li>
<li class="menu_option">
<h4><span>디스플레이 (단위/cm)</span></h4>
<ul>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "35.5cm") { echo "checked"; }} ?> name="qs[]" value="35.5cm"/><span class="cname">35.5 cm</span></ol>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "33.7cm") { echo "checked"; }} ?> name="qs[]" value="33.7cm"/><span class="cname">33.7 cm</span></ol>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "39.6cm") { echo "checked"; }} ?> name="qs[]" value="39.6cm"/><span class="cname">39.6 cm</span></ol>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "43.1cm") { echo "checked"; }} ?> name="qs[]" value="43.1cm"/><span class="cname">43.1 cm</span></ol>
</ul>
</li>
<li class="menu_option">
<h4><span>프로세서</span></h4>
<ul>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "인텔® 코어™ i7") { echo "checked"; }} ?> name="qs[]" value="인텔® 코어™ i7"/><span class="cname">인텔® 코어™ i7</span></ol>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "인텔® 코어™ i5") { echo "checked"; }} ?> name="qs[]" value="인텔® 코어™ i5"/><span class="cname">인텔® 코어™ i5</span></ol>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "인텔® 코어™ i3") { echo "checked"; }} ?> name="qs[]" value="인텔® 코어™ i3"/><span class="cname">인텔® 코어™ i3</span></ol>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "인텔® 펜티엄®") { echo "checked"; }} ?> name="qs[]" value="인텔® 펜티엄®"/><span class="cname">인텔® 펜티엄®</span></ol>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "AMD Ryzen™") { echo "checked"; }} ?> name="qs[]" value="AMD Ryzen™"/><span class="cname">AMD Ryzen™</span></ol>
</ul>
</li>
<li class="menu_option">
<h4><span>그래픽</span></h4>
<ul>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "NVIDIA® GeForce®") { echo "checked"; }} ?> name="qs[]" value="NVIDIA® GeForce®"/><span class="cname">NVIDIA® GeForce®</span></ol>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "인텔® Iris® Plus Graphics") { echo "checked"; }} ?> name="qs[]" value="인텔® Iris® Plus Graphics"/><span class="cname">인텔® Iris® Plus Graphics</span></ol>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "인텔® HD Graphics") { echo "checked"; }} ?> name="qs[]" value="인텔® HD Graphics"/><span class="cname">인텔® HD Graphics</span></ol>
<ol><input type="checkbox" <?php for($i=0; $i<count($_GET['qs']); $i++) { if($_GET['qs'][$i] == "Radeon™ Graphics") { echo "checked"; }} ?> name="qs[]" value="Radeon™ Graphics"/><span class="cname">Radeon™ Graphics</span></ol>
</ul>
</li>
<li class="menu_option">
<div class="ri_co">
<p>결과 개수</p>
<h3>총 <span style="color:rgba(165, 0, 52, 0.9);"><?php echo $total_count; ?></span> 개</h3>
<input type="submit" value="상세검색" style="margin-top: 20px;padding: 10px 20px 10px 20px;border: 1px solid #787878;border-radius: 17px;color: #1d1d1d;">
<input type="hidden" name="ca_id" id="ca_id" value="<?php echo $_GET['ca_id']; ?>">
</div>
</li>
</ul>
<!-- 조건 검색 끝 -->
</form>
<script>
$(".cname").each(function(index) {
var cname = $(this).text();
var caid = $("#ca_id").val();
var cthis = $(this).parents().children(".cnt");
var cajax = $.ajax({
url: "../theme/basic/skin/shop/basic/cate_json.php",
method : "GET",
data: { cate:cname, ca_id:caid},
dataType:"html"
}).done(function(data) {
cthis.text(" ("+data+")");
});
});
</script>
!-->!-->
답변 1
<?php <-- 이부분
$ca_id = $_GET['ca_id'];
if($ca_id=="3010" || $ca_id=="3010") {
include "../theme/basic/skin/shop/basic/cate/cate_1_1.php";
}
?>
체크해드린부분 수정해보세요
답변을 작성하시기 전에 로그인 해주세요.