Hello, i want a upload in gallery page from modern acc
Using this script
Form
uploadimages.php
but doesnt work, happen this error
Rep++
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
Rep++