 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
wallwriter
Joined: 20 Aug 2008 Posts: 2
|
Posted: Wed Aug 20, 2008 1:58 am Uploader Questions |
|
|
|
Hi, this is my first post here. I'm currently trying to build a site for a musician friend of mine. I want to incorporate some uploaders where he can upload pics, music, videos. Each will have a different page. I have the uploader sorted and I've got a bit of script which can display the pictures in a given folder.
{{{{{{{Looks sth like this:
<?
$handle = @opendir("Pictures");
if(!empty($handle))
{
while(false !== ($file = readdir($handle)))
{
if(is_file("Pictures/" . $file))
echo '<img src="Pictures/' . $file . '"><br><br>';
}
}
closedir($handle);
?
}}}}}}}
Is it possible to change this bit so that it displays the music folder instead. Obviously the folder name will be changed from 'Pictures' to 'Music'.
I'm guessing I also need to change sth this line:
echo '<img src="Pictures/' . $file . '"><br><br>';
????
But to what i dont know. Could anyone help me? |
|
Daler
Joined: 23 May 2008 Posts: 52
|
Posted: Wed Aug 20, 2008 2:02 am |
|
|
|
So what are you trying to do?
Do you want to set it so that the files are up for download, or so that they can be played online? |
|
wallwriter
Joined: 20 Aug 2008 Posts: 2
|
Posted: Wed Aug 20, 2008 2:09 am |
|
|
|
I dont think i've thought this through properly:?
I was thinking that the files would list themselves, they could then be clicked on to open in quicktime for example, by right clicking they could be saved to computer. Not sure now that this is the best option.
However, with regard to the initial question. Just the code to list the files in the folder would be enough to answer that. |
|
Daler
Joined: 23 May 2008 Posts: 52
|
Posted: Tue Aug 26, 2008 12:37 am |
|
|
|
| What you would have to do would probably manually write in the url of the music files yourself. I'm not sure if they will make the visitor download the files, or if they'll play. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|