|
| | #1 (permalink) |
| Legendary Join Date: May 2002
Posts: 2,338
| Quick PHP help Hey guys, I'm putting in an upload/download script for a specific function in a sub-dir of my webpage. It's just a script I found on the net. This is the the function of the script that lists the files in the download directory. /************************************************** ********** * List Files ************************************************** **********/ $handle=opendir($upload_dir); $filelist = ""; while ($file = readdir($handle)) { if(!is_dir($file) && !is_link($file)) { $filelist .= "".$file.""; if ($DELETABLE) $filelist .= " x"; $filelist .= " ".date("d-m H:i", filemtime($upload_dir.$file)) ." "; $filelist .=" "; } } What I need to do, is where it lists the current files in the diretory, when it lists them, I want it to make a link to the same file .. So.. like where it says $filelist .= "".$file.""; or whatever, I need it to do |
| | |
| | #2 (permalink) |
| Registered User Join Date: Jun 2002
Posts: 217
| You concatenate strings with the period operator in php. i.e. Code:
Code:
|
| | |
| | #3 (permalink) |
| Legendary Join Date: May 2002
Posts: 2,338
| Hey Man! That seems to make sense. You're totally right, the first way is a lot more readable and makes it make more sense. Thank you! Aychamo
__________________ "Do us all a great big favor and ask to be banned again. Those were much, much, happier times. Also, you're a faggot who is terrible at debating." - Person who gave me - internets! |
| | |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
| |