남자. 문제를 찾아 내도록 도와주세요.file_get_contents와 붙어있어
<?php
define('C', 16); // NUMBER OF ROWS
define('D', 6); // NUMBER OF CELLS
$file = @file_get_contents('http://ftvgirlsbay.com/design/tables/gals.txt');
if($file === FALSE) {
echo "<h2>Make file gals.txt with data!</h2>";
return FALSE;
}
$file = explode("\r\n", $file);
$thumbs = array();
while(list(,$el) = each($file)) {
$el = explode('|', $el);
if(isset($el[0]) && isset($el[1]))
$thumbs[] = array($el[0], $el[1]);
}
//print_r($thumbs);
$size = sizeof($thumbs);
if($size < C*D) {
echo "<h2>More data needed. You have $size, you need ".C*D."!</h2>";
return FALSE;
}
$range = range(0, $size - 1);
shuffle($range);
//print_r($range);
?>
<table align=center>
<?php
$num = 0;
for($i = 0; $i < C; $i++) {
echo '<tr align=center>'."\r\n";
for($k = 0; $k < D; $k++) {
echo '<td><a href="'.$thumbs[$range[$num]][1].'">FTV '.$thumbs[$range[$num]][0].' Gallery</a> </td>'."\r\n";
$num++;
}
echo '</tr>'."\r\n";
}
?>
</table>
이 스크립트의 결과는 : 내 ftvgirlsbay.com 사이트에서 하나의 스크립트가 ".! 더 많은 데이터를 필요 당신은 일이, 당신이 96 필요" 은 (http://ftvgirlsbay.com/random_scripts/test.php)
만약이 부분
$file = @file_get_contents('http://ftvgirlsbay.com/design/tables/gals.txt');
변경하는 경우가
(http://ftvgirlsbay.com/random_scripts/test2.php)
그래서 잘 작동
$file = @file_get_contents('http://sexsticker.info/ftvgirlsbay.com/pictable/gals.txt');
에이 .txt로 I 링크 내 서버 측 스크립트의 파일은 단 한 줄을 읽습니다. 원격 서버의 .txt에 링크 된 경우 - 스크립트가 모든 행을 작동 함
기본 디버깅을 직접 했습니까? '$ file','$ el' 등이 당신이 생각하는 것을 포함하고 있는지 확인 했습니까? –