include추가시 화면이 안나오거나 레이아웃이 다풀어지는데....... 채택완료
썸네일을 사용하는 게시판스킨에 아래코드를추가하면 먹통이되거나 레이아웃이 다풀어지는데
어디를 봐야하나요? 뭐가잘못된건지........ㅠ.ㅠ
</strong></p>
<p><?php</p>
<p>include_once(G5_LIB_PATH . '/thumbnail.lib.php');
include_once($board_skin_path.'/geoip.inc'); //추가된코드
$gi = geoip_open($board_skin_path."/GeoIP.dat",GEOIP_STANDARD); </p>
<p><strong>
답변 3개
geoip.inc 파일을 봐야하는데요.
중간에 exit; 를 넣어보면서.. 어느 부분이 문제인지 찾아내야 합니다.
오류가 나지 않는 부분부터 단계별로 아래로 옮기다보면 문제인 부분을 찾을수 있습니다.
답변에 대한 댓글 2개
위에 소스에서도 수정해보세요.
안되시면, 카톡 eyekissing
댓글을 작성하려면 로그인이 필요합니다.
제가 정확히 알고 있는지는 모르겠으나 *.inc 파일은 php 에서는 파서 함수를 사용해야 하는 것으로 알고 있습니다.
php.net 에서 함수 검색해 보시면 parse_ini_file 라고 있는데 링크는
https://www.php.net/manual/en/function.parse-ini-file.php">https://www.php.net/manual/en/function.parse-ini-file.php
불러오는 곳에서는 이렇게 쓰시면
</p>
<p><font face="Courier New"><span style="color: rgb(0, 0, 187);"><?php
define</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'BIRD'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(221, 0, 0);">'Dodo bird'</span></font><span style="color: rgb(0, 119, 0);"><font face="Courier New">);</font></span>
<font face="Courier New"><span style="color: rgb(255, 128, 0);">// Parse without sections</span>
<span style="color: rgb(0, 0, 187);">$ini_array </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">parse_ini_file</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">"sample.ini"</span></font><font face="Courier New"><span style="color: rgb(0, 119, 0);">);</span>
<span style="color: rgb(0, 0, 187);">print_r</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$ini_array</span></font><span style="color: rgb(0, 119, 0);"><font face="Courier New">);</font></span>
<font face="Courier New"><span style="color: rgb(255, 128, 0);">// Parse with sections</span>
<span style="color: rgb(0, 0, 187);">$ini_array </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">parse_ini_file</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">"sample.ini"</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">true</span></font><font face="Courier New"><span style="color: rgb(0, 119, 0);">);</span>
<span style="color: rgb(0, 0, 187);">print_r</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$ini_array</span></font><font face="Courier New"><span style="color: rgb(0, 119, 0);">);</span>
<span style="color: rgb(0, 0, 187);">?></span> </font></p>
<p>
이 값이 값으로 찍으면 요렇게 나옵니다.
Array ( [one] => 1 [five] => 5 [animal] => Dodo bird [path] => /usr/local/bin [URL] => http://www.example.com/~username [phpversion] => Array ( [0] => 5.0 [1] => 5.1 [2] => 5.2 [3] => 5.3 ) [urls] => Array ( [svn] => http://svn.php.net [git] => http://git.php.net ) ) Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => Dodo bird ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( [phpversion] => Array ( [0] => 5.0 [1] => 5.1 [2] => 5.2 [3] => 5.3 ) [urls] => Array ( [svn] => http://svn.php.net [git] => http://git.php.net ) ) )
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
그리고 geoip.inc파일 제일처음에 exit;를 넣어봐도 마찬가지입니다..
스킨소스좀 봐주실주있나요?