b

이미지 클릭 하면 로그인 해야만 클릭 할수 있는 방법은 없을까요?

· 2013-04-11 (목) 16:04:49 · 1699 · 8
이미지 클릭 하면 로그인 해야만 클릭 할수 있는 방법은 없을까요?

<td>
<a href="<?=$g4[shop_path]?>/list.php?ca_id=20"><img src="<?=$g4[path]?>/images/cat_road_02.gif" width="145" height="223" alt="" border="0"></a></td>
|

댓글 8개

2013-04-11 (목) 16:15:43
[code]
<?if($is_member){?>
<a href="<?=$g4[shop_path]?>/list.php?ca_id=20"><img src="<?=$g4[path]?>/images/cat_road_02.gif" width="145" height="223" alt="" border="0"></a>
<?}else{?>
<img src="<?=$g4[path]?>/images/cat_road_02.gif" width="145" height="223" alt="" border="0">
<?}?>
[/code]
화일상단에 아래 코드를 넣으면 됩니다

if(!$member[mb_id]) $g4[shop_path]="#';
<?
include_once("./_common.php");

//echo dirname(__FILE__);

define("_INDEX_", TRUE);

$g4[title] = "";
include_once("$g4[path]/head.php");
?>

<script language="JavaScript" src="<?=$g4[path]?>/js/shop.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<SCRIPT type=text/javascript>
var flashvars = {};
flashvars.xml = "config.xml";
var params = {};
params.allowscriptaccess = "always";
params.allownetworking = "all";
params.wmode = "transparent";
var attributes = {};
attributes.id = "slider";
</SCRIPT>
상단에 넣으면 오류가 되는데요
오류 난다는 넣은 코드는 어디있나요?
설마 _comon.php보다 위쪽에 넣은 건 아니겠죠?
<?
include_once("./_common.php");

//echo dirname(__FILE__);

define("_INDEX_", TRUE);
if(!$member[mb_id]) $g4[shop_path]="#';
$g4[title] = "";
include_once("$g4[path]/head.php");
?>
오류는
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in D:\APMServ5.2.6\www\htdocs\hanmaum\index.php on line 9
$g4[shop_path]="#'; <---- 따옴표 앞뒤가 다르게 됐네요
이런 오타는 코드 보면 모르시나요?
$g4[shop_path]="#";
아 예 일단은 고맙구요 !
바꿔 넣으면

Warning: include(#/boxtodayview.inc.php) [function.include]: failed to open stream: No such file or directory in D:\APMServ5.2.6\www\htdocs\shijinmaoyi\head.php on line 228

Warning: include() [function.include]: Failed opening '#/boxtodayview.inc.php' for inclusion (include_path='.;C:\php5\pear') in D:\APMServ5.2.6\www\htdocs\shijinmaoyi\head.php on line 228
#/maintype20.inc.php 파일을 찾을 수 없습니다.
#/maintype10.inc.php 파일을 찾을 수 없습니다.
이런 오류가 나 옵니다 도와 주세요!!!!
이렇게 해보세요
if(!$member[mb_id]) $link='#';
else $link=$g4[shop_path].'/list.php?ca_id=20';
이렇게 상단에 넣고
링크에서
<a href="<?=$link">
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13-04-12 조회 1,649
13-04-12 조회 958
13-04-12 조회 1,766
13-04-12 조회 2,033
13-04-12 조회 1,782
13-04-12 조회 1,638
13-04-12 조회 1,667
13-04-11 조회 1,661
13-04-11 조회 1,941
13-04-11 조회 937
13-04-11 조회 5,842
13-04-11 조회 1,082
13-04-11 조회 1,653
13-04-11 조회 1,161
13-04-11 조회 928
13-04-11 조회 1,697
13-04-11 조회 1,746
13-04-11 조회 1,053
13-04-11 조회 1,700
13-04-11 조회 979