madspof Posted September 3, 2006 Share Posted September 3, 2006 i need some help with a script that i have edited i no that the script worked when i haddnt edited but i now need for the script to get the directory name for it to list. I think the part of the script that is wrong is this bit:$fp = opendir($dir/$directory); but this is the whole script can some one have a look and see if anythink is obv wrong with it <?php// The folder where you keep your mp3's$directory = $_GET["directory"]; // ?directory=song_name.mp3$dir = "music"; $fp = opendir($dir/$directory);while ($file = readdir($fp)) { if (!ereg("^\.", $file)) { $file_url = "$dir/$directory/" . $file;?><body bgproperties="fixed" background="back%20(Custom).jpg"><div align="center"><a href="<?php echo("playertest.php?song=$file"); ?>" target="banner2"><?php echo($file); ?></a><br> <?php }}closedir($fp);?></div> Quote Link to comment https://forums.phpfreaks.com/topic/19597-get-comand-mixed-into-a-listing-script/ Share on other sites More sharing options...
wildteen88 Posted September 3, 2006 Share Posted September 3, 2006 Try:$fp = opendir($dir . '/' .$directory);instead of $fp = opendir($dir/$directory); Quote Link to comment https://forums.phpfreaks.com/topic/19597-get-comand-mixed-into-a-listing-script/#findComment-85259 Share on other sites More sharing options...
madspof Posted September 3, 2006 Author Share Posted September 3, 2006 thnks that worked Quote Link to comment https://forums.phpfreaks.com/topic/19597-get-comand-mixed-into-a-listing-script/#findComment-85261 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.