게시판 추가 질문드려요 채택완료
안녕하세요
그누보드5 초기화면 index.php에 최신글 들이 보이는데
그글들 아래에
갤러리 게시판을 보이게 하고 싶어요
아래는 index.php 파일 내용이에요
<!-- 최신글 시작 { -->
생략
<!-- } 최신글 끝 -->
위의 최신글 소스 바로 아래 와 맨 아래 tail.php 사이에 빨간색 글 처럼 include하면 안되나요?
<?php
include_once(G5_BBS_URL.'/board.php?bo_table=myboard');
include_once(G5_PATH.'/tail.php');
?>
아래처럼 에러가 나네요 왜 그래요? ^^
Warning: include_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /opt/lampp/htdocs/myuser/public_html/index.php on line 60 (위에서 빨간 색 글자 부분이 60째줄 이에요)
초기화면 index.php에 최신글 들 아래에
갤러리 게시판을 보이게 하려면 어떻게 해야 해요? ^^
답변 4개
1. 경로는 url이 아닌 path
include_once(G5_BBS_URL.'/board.php?bo_table=myboard'); X
include_once(G5_BBS_PATH.'/board.php?bo_table=myboard'); O
2. querystring은 별도로 변수로 정의
include_once(G5_BBS_URL.'/board.php?bo_table=myboard'); X
$bo_table='myboard'; include_once(G5_BBS_PATH.'/board.php'); O
3. 구문이 맞더라도 독립적으로 실행되는 board.php 파일은 인클루드해도 정상작동하지 않습니다.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
<button onclick="copyCodePrism(this)" class="copy-code-btn" style="position: absolute; top: 10px; right: 10px; z-index: 10; background: rgba(0,0,0,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 6px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; transition: all 0.2s; backdrop-filter: blur(10px);" onmouseover="this.style.background='rgba(0,0,0,0.7)'; this.style.transform='translateY(-1px)'" onmouseout="this.style.background='rgba(0,0,0,0.5)'; this.style.transform='translateY(0)'">
<svg style="width: 14px; height: 14px; display: inline-block; vertical-align: middle; margin-right: 4px;" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path>
</svg>
<span class="copy-text">Copy</span>
</button>
<pre class="language-php"><code class="language-php"><div><?php echo latest("최신 갤러리 스킨 이름", 게시판 ID, 목록수, 제목 글자수); ?>[/div]</code></pre>
</div><br />
'최신글 시작'부터 '최신글 끝'까지의 소스를 참고하면 됩니다.<br />
해당 소스는 모든 게시판을 자동으로 출력하는 소스이고<br />
위 소스는 특정 1개 게시판만 출력하는 소스입니다.<br />
<br />
최신 갤러리 스킨을 올리는 곳은<br />
theme/사용 테마/skin/latest/'입니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
2번은 무슨말씀인지 모르겠어요? 무슨 뜻인가요?
$bo_table='myboard'; include_once(G5_BBS_PATH.'/board.php'); O 이 아니라
$bo_table='myboard'; include_once(G5_BBS_PATH.$bo_table); 을 하라는 말씀인가요?