Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 7th, 2005, 10:45 PM   #11
codetaino
Programmer
 
codetaino's Avatar
 
Join Date: Jan 2005
Location: Bayamon, Puerto Rico
Posts: 71
Rep Power: 4 codetaino is on a distinguished road
Magic e:

I tried your code... without the styles, javascript and mysql queries (assigning values directly to the variables you use to get the image address, the link name, footer message etc.) I made some changes to your code and at least for me it woked with 1670 files... i uses the exclamation sing from here to tested and it worked... i even could access the files... im running on windows xp professional... Here is the part of your code that I changed...
[PHP]if ($tmg == 1) {
while (false !== ($file = readdir($dir4me))) {

//changed != for !==
if ($file !== "." && $file !== ".." && $file !== ".htaccess" && $file !== ".htpasswrd" && $file !== "index.php"&& $file !== "index.html"&& $file !== "manik.php" && $file !== "~.htaccess" && $file !== "~.passwrd" && $file !== ".passwd" && $file !== "~passwd"&& $file !== "~.passwd"&& $file !== ".log") { /* Remeber To provent a certain file or filetype add it to this line*/
//added " " to the html attributes
echo '<table border="0" width="100%" id="Drlist"><tr><td><p align="center">'.$file.'</td><td><a title="Listen" href="'.rawurlencode($file).'"><p align="center"><img border="0" src="'.$mg.'"></a></p></td></tr></table>';
}
}
closedir($dir4me);
}else {
while (false !== ($file = readdir($dir4me))) {

//changed != for !==
if ($file !== "." && $file !== ".." && $file !== ".htaccess" && $file !== ".htpasswrd" && $file !== "index.php"&& $file !== "index.html"&& $file !== "manik.php" && $file !== "~.htaccess" && $file !== "~.passwrd" && $file !== ".passwd" && $file !== "~passwd"&& $file !== "~.passwd"&& $file !== ".log") { /* Remeber To provent a certain file or filetype add it to this line*/

//added " " to the html attributes
echo '<table border="0" width="100%" id="Drlist"><tr><td><p align="center">'.$file.'</td><td><a title="" href="'.rawurlencode($file).'"><p align="center">'.$mlf.'</a></p></td></tr></table>';
}
}
closedir($dir4me);
}[/PHP]
Also i was wondering why you use a while when calling the $row=mysql_fetch_array if it seems the process could be done just one time because if called more than once the variables will be overwritten.

hope the changes fix your problem
-codetaino
__________________
"God bless u all" :)
codetaino is offline   Reply With Quote
Old Feb 8th, 2005, 9:56 AM   #12
magic_e
Programmer
 
Join Date: Jan 2005
Posts: 44
Rep Power: 0 magic_e is on a distinguished road
thanx codetaino but for some reason after using your script none of the files are being listed????

when running the script on a windows system nothing is shown but if i run the script on a linux server the following error is given

Quote:
Warning: readdir(): supplied argument is not a valid Directory resource in /home/stuie/domains/underground-vinyls.co.uk/public_html/Audio/Makina/index.php on line 18

Warning: closedir(): supplied argument is not a valid Directory resource in /home/stuie/domains/underground-vinyls.co.uk/public_html/Audio/Makina/index.php on line 26
thanx again for the help
magic_e is offline   Reply With Quote
Old Feb 8th, 2005, 11:07 AM   #13
codetaino
Programmer
 
codetaino's Avatar
 
Join Date: Jan 2005
Location: Bayamon, Puerto Rico
Posts: 71
Rep Power: 4 codetaino is on a distinguished road
Did you replace this code with the equivalent part in you original code.... the one in your first post! If you did so... Did you change the variable name of $dir4me? If so change the variable names in the calles of readdir() and closedir();

-codetaino
__________________
"God bless u all" :)
codetaino is offline   Reply With Quote
Old Feb 8th, 2005, 11:23 AM   #14
codetaino
Programmer
 
codetaino's Avatar
 
Join Date: Jan 2005
Location: Bayamon, Puerto Rico
Posts: 71
Rep Power: 4 codetaino is on a distinguished road
by the way i saw the page.... nice design. for the display you are doing of the files... i would recommend changing the images to the right... becase the names are variable that will gave a look of order... beside that I love the design

good work

-codetaino
__________________
"God bless u all" :)
codetaino is offline   Reply With Quote
Old Feb 8th, 2005, 12:02 PM   #15
magic_e
Programmer
 
Join Date: Jan 2005
Posts: 44
Rep Power: 0 magic_e is on a distinguished road
thanx again codetaino,

after looking through the code i found that i was even dumer than i though, the $dir4me varible wasn't actually being set i forgot to add that bit back in

but still after running the code not all files are listed on the first load, it takes a refresh or two to show all files (on a windows server using firefox) maybe it's my setup?


Quote:
by the way i saw the page.... nice design. for the display you are doing of the files... i would recommend changing the images to the right... becase the names are variable that will gave a look of order... beside that I love the design

good work
i dont understand what u mean (sorry :o) could u plz elberate on what u think i could do to make it better

once again thanx
magic_e is offline   Reply With Quote
Old Feb 9th, 2005, 12:34 AM   #16
codetaino
Programmer
 
codetaino's Avatar
 
Join Date: Jan 2005
Location: Bayamon, Puerto Rico
Posts: 71
Rep Power: 4 codetaino is on a distinguished road
changing the images to the LEFT.... my bad

i mean this:
[img] name of filenamte.wma

-codetaino
__________________
"God bless u all" :)
codetaino is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:38 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC