|
| | #1 (permalink) |
| Legendary Join Date: May 2002
Posts: 2,917
| 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 http://www.emedicine.com/med/topic280.htm |
| | |
| | #2 (permalink) |
| Registered User Join Date: Jun 2002
Posts: 221
| You concatenate strings with the period operator in php. i.e. Code:
Code:
|
| | |
| | #3 (permalink) |
| Legendary Join Date: May 2002
Posts: 2,917
| 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
__________________ Lumie: There are no cancers of the heart. Aychamo: http://www.emedicine.com/med/topic280.htm |
| | |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
| |