Hello,
Simple is not so simple i see,
Trying to save file in html-format from server to local disk.
<?php
if(isset($_POST['submit'])) {
$file = $_POST['file'];
file_get_contents('files/$file');
file_put_contents('download/$file');
}
?>
<form method="post" action="">
<select name="getfile" id="getfile">
<option value="">Select file...</option>
<?php
$dir_open = opendir('files/');
while(false !== ($filename = readdir($dir_open))){
if($filename != "." && $filename != ".."){
echo "<option value='$filename'>$filename</option>";
}
}
closedir($dir_open);
?>
</select>
<input type="submit" name="submit" value="Get file" class="basebutton" style="width: 55px;">
</form>
Looks simple, get filename, but writes nothing to download-share in local disk.
Local share is granted to everyone and IIS-users.