$ 안에서 G5_URL 불러오는 방법좀 알려주세요..ㅠㅠ

$ 안에서 G5_URL 불러오는 방법좀 알려주세요..ㅠㅠ

QA

$ 안에서 G5_URL 불러오는 방법좀 알려주세요..ㅠㅠ

본문

$div = "<div class='col-xs-10 col-xs-offset-1 col-sm-6 col-sm-offset-0  col-md-3  col-md-offset-0 ' style='width:200px'>

<div class='wow bounceInUp' data-wow-delay='0.2s'>

<div class='team boxed-white'>

<div class='inner'>

<div class='img'>

<img id='img' src=$mb_profile_img_url alt='' class='img-circle'>

<div class='subject'>

sdf

</div>

</div>

</div>

<div class='subtitle'>

<a href='G5_BBS_URL/profile.php?mb_id=$row[mb_id]'><strong>$row[mb_nick]</strong></a>

</div>

</div>

</div>

</div>";

 

 

 

 

<a href='G5_BBS_URL/profile.php?mb_id=$row[mb_id]'><strong>$row[mb_nick]</strong></a> 

 

여기서 G5_BBS_URL 을 불러오고 싶은데 잘 안되네요 ㅠㅠ <?php echo G5_BBS_URL?>을 넣어도 안되고.. 어떻게 해야할지..

이 질문에 댓글 쓰기 :

답변 3

문자열안에 상수 넣으려면 문자열을 탈출? 해야합니다.

 

예를 들어  

$div ="<a href='G5_BBS_URL/profile.php?mb_id=$row[mb_id]'><strong>$row[mb_nick]</strong></a> ";

 

라면 

$div ="<a href='" . G5_BBS_URL . "/profile.php?mb_id=$row[mb_id]'><strong>$row[mb_nick]</strong></a> ";

 

어렇게 바꿔야 합니다. 

$??? = ""; 이런식으로 불러올때 

 

태그 사이에 ".G5_BBS_URL."

를 불러 오면되구요.

 

$??? = ''; 이런식으로 불러올때 

 

태그 사이에 '.G5_BBS_URL.'

를 불러오면 됩니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 157
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT