Uploading file to ftp in one php file.
If you want to upload files to your ftp folder easy please follow the stept or you can download ready zip documents free.

Creating an upload form

1.First create a file as upload.php in your ftp and paste this code then save it. if you wanna change upload location then find the 
if(empty($errors)==true){
         move_uploaded_file($file_tmp,"images/".$file_name);
and change images/ folder with new on
<?php
   if(isset($_FILES['image'])){
      $errors= array();
      $file_name = $_FILES['image']['name'];
      $file_size =$_FILES['image']['size'];
      $file_tmp =$_FILES['image']['tmp_name'];
      $file_type=$_FILES['image']['type'];
      $file_ext=strtolower(end(explode('.',$_FILES['image']['name'])));
      
      $extensions= array("jpeg","jpg","png");
      
      if(in_array($file_ext,$extensions)=== false){
         $errors[]="extension not allowed, please choose a JPEG or PNG file.";
      }
      
      if($file_size > 2097152){
         $errors[]='File size must be excately 2 MB';
      }
      
      if(empty($errors)==true){
         move_uploaded_file($file_tmp,"images/".$file_name);
         echo "Success";
      }else{
         print_r($errors);
      }
   }
?>
<html>
   <body>
      
      <form action="" method="POST" enctype="multipart/form-data">
         <input type="file" name="image" />
         <input type="submit"/>
      </form>
      
   </body>
</html>
<?php
   if(isset($_FILES['image'])){
      $errors= array();
      $file_name = $_FILES['image']['name'];
      $file_size = $_FILES['image']['size'];
      $file_tmp = $_FILES['image']['tmp_name'];
      $file_type = $_FILES['image']['type'];
      $file_ext=strtolower(end(explode('.',$_FILES['image']['name'])));
      
      $extensions= array("jpeg","jpg","png");
      
      if(in_array($file_ext,$extensions)=== false){
         $errors[]="extension not allowed, please choose a JPEG or PNG file.";
      }
      
      if($file_size > 2097152) {
         $errors[]='File size must be excately 2 MB';
      }
      
      if(empty($errors)==true) {
         move_uploaded_file($file_tmp,"images/".$file_name);
         echo "Success";
      }else{
         print_r($errors);
      }
   }
?>
<html>
   <body>
      
      <form action = "" method = "POST" enctype = "multipart/form-data">
         <input type = "file" name = "image" />
         <input type = "submit"/>
            
         <ul>
            <li>Sent file: <?php echo $_FILES['image']['name'];  ?>
            <li>File size: <?php echo $_FILES['image']['size'];  ?>
            <li>File type: <?php echo $_FILES['image']['type'] ?>
         </ul>
            
      </form>
      
   </body>
</html>

0
Add comment
Name:*
E-Mail:


reload, if the code cannot be seen
(↑) Write code
www.northkoala.com
Attantion! Corona virus Countrys: Africa: Algeria Burkina Faso Cameroon Democratic Republic of Congo Nigeria Senegal South Africa Togo ---- Americas: Argentina Bolivia Brazil Canada Chile Colombia Costa Rica Dominican Republic Ecuador French Guiana Guadalupe Honduras Jamaica Martinique Mexico Panama Paraguay Peru United States -- Eastern Mediterranean: Afghanistan Bahrain Egypt Iran Iraq Jordan Kuwait Lebanon Morocco Oman Pakistan Qatar Saudi Arabia Tunisia United Arab Emirates Europe Albania Andorra Armenia Austria Azerbaijan Belarus Belgium Bosnia and Herzegovina Bulgaria Croatia Cyprus Czechia Denmark Estonia Finland France Georgia Germany Gibraltar Greece Holy See (Vatican City) Hungary Iceland Ireland Israel Italy Latvia Liechtenstein Lithuania Luxembourg Malta Moldova Monaco Netherlands North Macedonia Norway Poland Portugal Romania Russia San Marino Serbia Slovakia Slovenia Spain Sweden Switzerland Turkey Ukraine United Kingdom South-East Asia Bangladesh Bhutan India Indonesia Maldives Nepal Sri Lanka Thailand Western Pacific Australia Brunei Darussalam Cambodia China Hong Kong Japan Macau Malaysia New Zealand Philippines Republic of Korea Singapore Taiwan Vietnam
Famous Quotes for you

"The best and most beautiful things in the world cannot be seen or even touched - they must be felt with the heart." -Helen Keller


Last Comments
Follow us
Flag's Cloud
Flag Counter

WELLCOME TO NORTHKOALA.COM!

Sign in for a closer look at the website
Regstration
Create your own account!

Regster
Sign in
Already registered? Very nice, just sign in!

Enter Website