הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   [שאלה] שלפית תמונות מתיקייה? הגיוני? (https://hosts.co.il/forums/showthread.php?t=68668)

vadimg88 24-10-08 15:26

תגיד קישור מלא בנתיב...ומה השגיאה?

CodeX 24-10-08 20:06

ציטוט:

נכתב במקור על ידי vadimg88 (פרסם 676340)
תגיד קישור מלא בנתיב...ומה השגיאה?

הקוד:

PHP קוד:

<?php 
$fileregex 
"[jpg|jpeg|png|gif]"
$path "/img/avatars/";  
$dir opendir($path); 
$images = array(); 
while (
$file readdir($dir)) 
 if (!
is_dir($dirname.$file) and $file <> ".." and $file <> "."
  if (
preg_match($fileregex,$file)) 
   
array_push($images,$dirname.$file); 
asort($images); 
$rpp 5;  
$ipr 4;  
$image_num count($images); 
$pages ceil($image_num / ($ipr $rpp)); 
$rows 1
if (isset(
$_GET['page'])) $page $_GET['page']; 
else 
$page 1
echo 
"<table>\n    <tr>\n"
for (
$i = ($ipr $rpp) * ($page 1); $i< ($ipr $rpp) * $page$i++) { 
if (
$i >= $image_num) break; 
$imgg $images[$i];
echo 
"        <td>\n            <a href='$imgg'><img height='100' width='100' src='$imgg' /></a>\n        </td>\n"
if(
is_int(($i+1) / $ipr)) 

 echo 
"    </tr>\n    <tr>\n"
 
$rows++; 


echo 
"    </tr>\n</table>\n"
for(
$i 1$i<=$pages;$i++) 
echo 
"<a href=\"?page=$i\">$i</a>\n"
?>

לא פותח לי את התייקיה AVATARS שבIMG

הוא מציג לי את השגיאה:
ציטוט:

Warning: opendir(/img/avatars/) [function.opendir]: failed to open dir: No error in C:\wamp\www\WarezIL\1.php on line 4

Warning: readdir(): supplied argument is not a valid Directory resource in C:\wamp\www\WarezIL\1.php on line 6

vadimg88 24-10-08 21:12

נסה להעביר לו נתיב מלא.


כל הזמנים הם GMT +2. הזמן כעת הוא 16:50.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ