?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


?
?Re: PHP Gallery code HELP!
Author:??(---.adsl.wanadoo.nl)
Date:???04-03-05 06:54

Oh, and another thing

when I click on a thumbnail in my gallery to view the larger image, I get this error:


Warning: sort() expects parameter 1 to be array, null given in portfolio/functions.inc on line 85


So, I look in line 85 of the functions.inc file, but I don't know what's wrong:

69 function search_file($basedir, $index)
70 {
71 $handle = opendir($basedir);
72
73 while ($file = readdir($handle))
74 {
75 if ((strstr(strtolower($file), '.bmp') ||
76 strstr(strtolower($file), '.gif') ||
77 strstr(strtolower($file), '.jpg') ||
78 strstr(strtolower($file), '.png')) &&
79 $file != "thumb.jpg")
80 {
81 $filelist[] = "$file";
82 }
83 }
84
85 sort($filelist);
86 closedir($handle);
87
88 return $filelist[$index - 1];
89 }


Help! :|

?Topics Author? Date
?PHP Gallery code HELP!??new
lpc 04-02-05 06:28?
?Re: PHP Gallery code HELP!??new
bastien 04-02-05 11:08?
?Re: PHP Gallery code HELP!??new
lpc 04-03-05 06:49?
?Re: PHP Gallery code HELP!??new
lpc 04-03-05 06:54?
?Re: PHP Gallery code HELP!??new
bastien 04-03-05 12:18?
?Re: PHP Gallery code HELP!??new
lpc 04-04-05 01:44?
?Re: PHP Gallery code HELP!??new
danny 04-08-05 01:20?
?Re: PHP Gallery code HELP!??new
lpc 04-08-05 12:23?
?Re: PHP Gallery code HELP!??new
danny 04-10-05 23:19?
?Re: PHP Gallery code HELP!??new
lpc 04-11-05 02:01?
?Re: PHP Gallery code HELP!??new
danny 04-12-05 00:02?
?Re: PHP Gallery code HELP!??new
lpc 04-12-05 07:52?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > Oh, and another thing > > when I click on a thumbnail in my gallery to view the larger > image, I get this error: > > > Warning: sort() expects parameter 1 to be array, null given > in portfolio/functions.inc on line 85 > > > So, I look in line 85 of the functions.inc file, but I don't > know what's wrong: > > 69 function search_file($basedir, $index) > 70 { > 71 $handle = opendir($basedir); > 72 > 73 while ($file = readdir($handle)) > 74 { > 75 if ((strstr(strtolower($file), '.bmp') || > 76 strstr(strtolower($file), '.gif') || > 77 strstr(strtolower($file), '.jpg') || > 78 strstr(strtolower($file), '.png')) && > 79 $file != "thumb.jpg") > 80 { > 81 $filelist[] = "$file"; > 82 } > 83 } > 84 > 85 sort($filelist); > 86 closedir($handle); > 87 > 88 return $filelist[$index - 1]; > 89 } > > > Help! :| ">??

Provided By
Phorum