common.php에 php파일 인클루드 하는 소스에 대해 질문이 있습니다. 채택완료
$extend_file = array();
$tmp = dir(G5_EXTEND_PATH);
while ($entry = $tmp->read()) {
// php 파일만 include 함
if (preg_match("/(\.php)$/i", $entry))
$extend_file[] = $entry;
}
위 소스에서
$entry = $tmp->read() 해당구문에 대해서 정확이 이해가 가지를 않아서 질문을 드립니다.
그리고 $entry가 어떤걸 담고 있는 것입니까??
답변 3개
</strong> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">$extend_file = array();</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">$tmp = dir(G5_EXTEND_PATH);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">while ($entry = $tmp->read()) {</p><p style="word-break: break-all;"><font color="#484848" face="돋움, Dotum, sans-serif"><span style="font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>var_dump($entry); // 뭘 담앗는지 출력하기</span></font></p><p style="word-break: break-all;"><font color="#484848" face="돋움, Dotum, sans-serif"><span style="font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>echo '
';</span></font></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> // php 파일만 include 함</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> if (preg_match("/(\.php)$/i", $entry))</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> $extend_file[] = $entry;</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">}</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><strong style="color: rgb(127, 127, 127); font-size: 13.3333px; line-height: normal;">
직접출력해보심 알것같은데요 , var_dump 요거루요
댓글을 작성하려면 로그인이 필요합니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인