• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Upload Script [PHP]

Acordion

Member
Joined
Mar 26, 2010
Messages
150
Reaction score
6
Location
Mèxico
Hello, i want a upload in gallery page from modern acc
Using this script

Form
PHP:
<form action="http://127.0.0.1//index.php/p/v/uploadimages" method="post" enctype="multipart/form-data">
    <b>Send a new archive: </b>
    <br>
    <input name="userfile" type="file">
    <br>
    <input type="submit" value="Send">
</form>

uploadimages.php
PHP:
<?php
$path="C:\xampp\htdocs\public\gallery";

$archive_name = $_FILES['userfile']['name'];
$archive_type = $_FILES['userfile']['type'];
$archive_zise = $_FILES['userfile']['size'];

if (!((strpos($archive_type, "gif") || strpos($archive_type, "png") || strpos($archive_type,"jpg")) && ($archive_zise < 2000000000))) {
echo "This file not is correct. <br><br><table><tr><td><li>Only *.gif, *.png o *.jpg<br><li>Max size 2mbs.</td></tr></table><br>";
echo "<a href='http://127.0.0.1//index.php/p/v/gallery'>Click here</a> if you will want to try again.";
}else{
if (move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], $path.$_FILES['userfile']['name'])){
echo "Archive has been send.";
}else{
echo "Sorry, try again.";
}
}
?>

but doesnt work, happen this error
sinttulo1ej.png


Rep++
 
Back
Top