Jump to content

shell_exec into href


hyster

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/242659-shell_exec-into-href/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.