hyster Posted July 22, 2011 Share Posted July 22, 2011 im messing about with shell_exec at the min on a server located on my pc. im trying to make a link out of the output. im getting the folder listings ok put the output does not work in the link part of the url. it echos the whole string in each repatition. am i mising something simple?? source <?php $var = shell_exec('dir f:\\media\\music\\ /o:s /b'); echo "<pre>"."<a href='ping.php?folder=".$var."'>".$var."</a>"."</pre>"; ?> output <a href="folder 1folder 2folder 3folder 4">folder 1</a> <a href="folder 1folder 2folder 3folder 4">folder 2</a> <a href="folder 1folder 2folder 3folder 4">folder 3</a> <a href="folder 1folder 2folder 3folder 4">folder 4</a> Quote Link to comment https://forums.phpfreaks.com/topic/242659-shell_exec-into-href/ 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.