ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

Download and Upload files using HTML & PHP

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.ย. 2024
  • Download and Upload files using HTML & PHP
    FOR MAC USERS
    make sure the uploads folder is read & writable. it is read only by default because many xampp folders are defaulted that way. Right click folder, click get info, unlock, change to read and write, now it should work.
    Source files:
    adnan-tech.com...

ความคิดเห็น • 297

  • @whatnowZA
    @whatnowZA 4 ปีที่แล้ว +7

    I've been looking for this for almost two weeks now :)

  • @MGzockt
    @MGzockt ปีที่แล้ว +2

    love your outro

  • @nidhishinde6420
    @nidhishinde6420 ปีที่แล้ว

    i have been looking for this since so long didn't find a perfect video except this!!!😭❤️

  • @KrzysiekTannenberg
    @KrzysiekTannenberg 4 ปีที่แล้ว

    Hello !
    could it be changed to make each file have a checkbox and after selecting it could be deleted?
    also when uploading add the function that when the file has the same name and size it would display "the file already exists" ?

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      Yes, for deleting you can use "unlink()" function and for checking duplicate file name, you can use "file_exists()" function.

  • @janmichaelbesinga3867
    @janmichaelbesinga3867 5 ปีที่แล้ว +4

    works like magic. two thumbs up*

  • @davidbermudez7704
    @davidbermudez7704 5 ปีที่แล้ว +4

    Just what I needed for my testing site thank you so much

  • @g-enterprises973
    @g-enterprises973 5 ปีที่แล้ว +1

    Hi. I tried everything that the video said, and i also copied the sample codes, but i was only able to select the file. The upload option did not work. Can some one please help me figure out what is wrong? Thanks in advance.

  • @moanxion9102
    @moanxion9102 5 ปีที่แล้ว +2

    I hope there are more You tubers like u

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      Thanks. Great to hear.
      Keep sharing to help me reach more people.

  • @joseluisbeltramone599
    @joseluisbeltramone599 5 ปีที่แล้ว +6

    Good tutorial. Right to the point!. Thanks a lot.

  • @phenomgaming3152
    @phenomgaming3152 5 ปีที่แล้ว +5

    Thumbs up dude u made it so simple

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      You're welcome. Make sure you subscribe for more helpful videos.

  • @macahilosclarkq.1672
    @macahilosclarkq.1672 3 ปีที่แล้ว +1

    Thank you this helps a lot

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      You are welcome.

    • @macahilosclarkq.1672
      @macahilosclarkq.1672 3 ปีที่แล้ว

      @@AdnanAfzal565 bro its saying php warning: File upload error - unable to create a temporary file in uknown on line 0

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      @@macahilosclarkq.1672 Check if you have any error in files object, like following:
      print_r($_FILES["video"]["error"]);

  • @Wabwire-Ronald
    @Wabwire-Ronald 3 ปีที่แล้ว

    This was very important for me. I had searched how to do this fr a long time. Thank you

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      You’re welcome.

    • @Wabwire-Ronald
      @Wabwire-Ronald 3 ปีที่แล้ว

      if i could now know how i can make the displayed documents in order from the most recent to the least, it will be so good.

    • @Wabwire-Ronald
      @Wabwire-Ronald 3 ปีที่แล้ว

      and also if i want to have another option of viewing the document instead of downloading it

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      For ordering, you can save the filename as timestamp and display in descending order.
      Display image and video is simple, for pdf you have to use header content-type: application/pdf

  • @syedazmat4032
    @syedazmat4032 6 ปีที่แล้ว +2

    thats what i was looking for...Thank you

  • @betelhemtesfaye7838
    @betelhemtesfaye7838 4 ปีที่แล้ว +1

    It's the precise and clean!!! Thanks Adnan!

  • @DamonMedekMusic
    @DamonMedekMusic 4 ปีที่แล้ว

    FOR MAC USERS
    make sure the uploads folder is read & writable. it is read only by default because many xampp folders are defaulted that way. Right click folder, click get info, unlock, change to read and write, now it should work. Thats why windows users are saying success while mac users are pulling their hair out.

  • @nsabimanaemmanuel5416
    @nsabimanaemmanuel5416 6 ปีที่แล้ว +1

    What amazing is this, you're the best,wawo special thanks i have been looking for this upload and download in php for a week and you have helped me.Once again thank you,very brief and specific.Please i would love to see when you also include error and extensions and file sizes for memory or space purposes.be blessed!!!!!!

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      Sure. Will do that too. Thanks.

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      @Jake Propst Can you explain what error you are facing ?

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      @Jake Propst No problem. Everyone was once a newbie.
      You can check your browser console. There must be an error in your Javascript.
      Right click in your browser empty space, go to "Inspect Element" then in "Console" tab.

  • @dreamc1626
    @dreamc1626 2 ปีที่แล้ว

    Thanks this is what i looking for

  • @aimannatasha4629
    @aimannatasha4629 6 ปีที่แล้ว +2

    Thank you very much for this coding tutorial :D

  • @askjdaksjdn
    @askjdaksjdn 2 ปีที่แล้ว +1

    is there anyway to create a new page to download and not just the same one with the download button ?

    • @AdnanAfzal565
      @AdnanAfzal565  2 ปีที่แล้ว

      Do you have any design so I can get the idea ?

  • @farmtech-1211
    @farmtech-1211 4 ปีที่แล้ว +1

    Thanks! This is very useful and simple

  • @hardyproceedings281
    @hardyproceedings281 3 ปีที่แล้ว

    That's what I call a man Job! Right to the point...Good job buddy!

  • @MuhammadAbdullahMirza
    @MuhammadAbdullahMirza 5 ปีที่แล้ว +1

    Very Good & simple video

  • @rupesh_kumar_mistri
    @rupesh_kumar_mistri 3 ปีที่แล้ว +1

    Thank You For sharing your source code it done its work

  • @smartwolf9045
    @smartwolf9045 4 ปีที่แล้ว

    Very clear, thanks a lot man you made my day

  • @mahmoudnasr7104
    @mahmoudnasr7104 4 ปีที่แล้ว

    It's very simple ... thanks a lot

  • @marcostark8926
    @marcostark8926 5 ปีที่แล้ว +2

    Thank you for this tutorial :)

  • @Artmoreralph
    @Artmoreralph 5 ปีที่แล้ว +1

    Sir whenever i click upload it doesmt do anything. the file is not there

  • @KatombelaHaggai
    @KatombelaHaggai 11 หลายเดือนก่อน

    On point 🙌🙌🙏

  • @emanaj8119
    @emanaj8119 5 หลายเดือนก่อน

    Thank you!
    What if i need to put it the links at table,
    (# , title, download link) ?
    Plz need script or video like this

  • @deepujojo4914
    @deepujojo4914 3 ปีที่แล้ว

    Awesome . Thank you

  • @andyjohn907
    @andyjohn907 4 ปีที่แล้ว +1

    thanks you really helped me..

  • @hajimohammed968
    @hajimohammed968 6 ปีที่แล้ว +1

    Legit life saver!!!

  • @jokerry9627
    @jokerry9627 6 ปีที่แล้ว +1

    when I click on the file ... it downloads the file with error: failed ... no file.

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      It is because you have selected the wrong file path, please double check your spellings.

    • @majdoubwided6666
      @majdoubwided6666 6 ปีที่แล้ว

      i have the same error, help please

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      You need to double check your spellings. It says that the file is not found on server.

  • @user-dz4qq7gv1w
    @user-dz4qq7gv1w 4 ปีที่แล้ว +1

    tp gimana cara kita linkkan agar file dapat di upload/download oleh setiap user tanpa di tampilkan ke user lain. sekali lagi terima kasih..!

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      Jika Anda memiliki sistem login maka Anda dapat menetapkan suatu kondisi berdasarkan ID pengguna.

  • @priyankaa9322
    @priyankaa9322 2 ปีที่แล้ว

    you r amazing. thank you

  • @haiderabbas6407
    @haiderabbas6407 2 ปีที่แล้ว

    Thank you, but I had trouble downloading a file or an image that doesn't do what I do.

    • @AdnanAfzal565
      @AdnanAfzal565  2 ปีที่แล้ว

      Which type of file you are trying to download ?

  • @myintthuaung1482
    @myintthuaung1482 4 ปีที่แล้ว

    Thank you so much, its really helpful.

  • @dishatiwari4994
    @dishatiwari4994 3 ปีที่แล้ว

    Hi Adnan
    I tried the way you showed in the video & its working fine but I'm not able to download txt and image files........can you suggest a code that I can add to make it work for image & txt files as well?

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      The code should be same for all files. Make sure the path and file name is correct.

  • @BB-fv7ib
    @BB-fv7ib 5 ปีที่แล้ว

    1) Can other computers access it just writing the local host path as long as your xamp server is on on your computer?
    2)Do you know how to restrict access around a wifi, meaning people can access that page if they are connected to that specific wifi

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว +1

      No. They can only access if they know your ipv4 address which can be get only from ipconfig /all command.

  • @janmichaelbesinga3867
    @janmichaelbesinga3867 5 ปีที่แล้ว +2

    but i think it doesnt upload files more than 2mb

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว +2

      You can always change the maximum upload file size from file "php.ini". You will see 2 directives in that file:
      upload_max_filesize
      and
      post_max_size

    • @janmichaelbesinga3867
      @janmichaelbesinga3867 5 ปีที่แล้ว +1

      @@AdnanAfzal565 how sir?

    • @janmichaelbesinga3867
      @janmichaelbesinga3867 5 ปีที่แล้ว +1

      @@AdnanAfzal565 got it already.. thanks :)

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      @@janmichaelbesinga3867 Great, let me know if you have any question.

  • @arjunraj-k
    @arjunraj-k 6 ปีที่แล้ว +1

    why the index $a starts at 2? ($a=2 in for loop)

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      because the first 2 indices are for "." current directory and ".." previous directory

  • @CuriousTV20
    @CuriousTV20 2 ปีที่แล้ว

    Very useful thank u♥

  • @everythingfree4643
    @everythingfree4643 4 ปีที่แล้ว

    register is not done verifying my gmail

  • @jonaspalmiano7211
    @jonaspalmiano7211 4 ปีที่แล้ว +1

    THANK YOU :)

  • @nilanthys5090
    @nilanthys5090 6 ปีที่แล้ว +1

    i did everything like in the vid,but when i click on the upload button, nothing happens. Can you help?

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      Can you send your code here ?

    • @nilanthys5090
      @nilanthys5090 6 ปีที่แล้ว

      INDEX.php :

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      Your tag is not properly closed. Use this:

    • @nilanthys5090
      @nilanthys5090 6 ปีที่แล้ว

      Thank you,but it still dont work. It does not even show the uploaded files,and i cant find them in the uploads folder neither. :/

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      Check your directory permissions, it should be 777.

  • @shreepadsarmalkar4075
    @shreepadsarmalkar4075 6 ปีที่แล้ว +1

    great work bhai

  • @zinkyawmoe5725
    @zinkyawmoe5725 5 ปีที่แล้ว +1

    helpful tutorial

  • @novelchandra8329
    @novelchandra8329 4 ปีที่แล้ว

    please i need your favor to this issue.. i download a excel file from local server, then i edit the file, then i upload it, i need to know is my file updated or not so i download the file again.. the system should've overwrite it but it's not.. but in the server PC it's updated.. tell me how to update the download link

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      When you are uploading the file, append the timestamp in it. Like this:
      move_uploaded_file($_FILES["file"]["tmp_name"], $_FILES["file"]["name"] . "-" . time());

    • @novelchandra8329
      @novelchandra8329 4 ปีที่แล้ว

      @@AdnanAfzal565 then it will add a new file instead overwrite it.. I need to update that download link.. thank you for your kindly reply

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      @@novelchandra8329 if the file name is same, then it will be updated.

    • @novelchandra8329
      @novelchandra8329 4 ปีที่แล้ว

      @@AdnanAfzal565 but in the code you've given to me it would be filename-time right??cmiiw

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      Yes.

  • @michaelangeloserban4859
    @michaelangeloserban4859 4 ปีที่แล้ว

    hi sir..im using datatables..i want to the download the specific file in my upload folder how can i do that..please help me..thank you

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      If you follow this tutorial completely, you will be able to download files.

  • @franco521
    @franco521 3 ปีที่แล้ว

    Great video

  • @thedevelopers3811
    @thedevelopers3811 5 ปีที่แล้ว +1

    good , very helpfull

  • @emraneklaai1808
    @emraneklaai1808 3 ปีที่แล้ว

    thank you sir ! you very helping me !

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      You are welcome. Glad to hear that.

  • @pulidivya5863
    @pulidivya5863 3 ปีที่แล้ว

    Thankyou so much

  • @islamersure9415
    @islamersure9415 3 ปีที่แล้ว

    helpfull.thanks

  • @akashsrivastava7883
    @akashsrivastava7883 4 ปีที่แล้ว

    How to save the uploaded file in the uploads folder with a specific name?

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      In your move_uploaded_file function, set second parameter to the file name of your choice. For example,
      move_uploaded_file($_FILES["file"]["tmp_name"], "uploads/My-file.png");

    • @akashsrivastava7883
      @akashsrivastava7883 4 ปีที่แล้ว +1

      @@AdnanAfzal565 thank you so much :)

  • @user-ed7pg9ut9c
    @user-ed7pg9ut9c 3 ปีที่แล้ว

    If I create a system like this in pc ,can I download the file with phone ?

  • @ujjawalsingh3350
    @ujjawalsingh3350 3 ปีที่แล้ว

    Thanks a lot

  • @mazharnadeem8358
    @mazharnadeem8358 4 ปีที่แล้ว +1

    amazing

  • @nivedisinghal8146
    @nivedisinghal8146 4 ปีที่แล้ว

    The link automatically downloads the file rather than opening it...help

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      Yes, this tutorial is about downloading the file. What type of file you want to view in the browser (pdf, excel etc.) ?

    • @nivedisinghal8146
      @nivedisinghal8146 4 ปีที่แล้ว

      Adnan Afzal i want every file type to get opened...i tried this pdf is directly downloading..docx and jpeg are opeing

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      There is no general method that will display any kind of file in the browser. You have to put conditions on each type of file and call functions separately.
      For example, to display the PDF file, you can follow:
      adnan-tech.com/pdf-view-in-browser-and-export-as-file-php/
      To display Excel file, you can follow:
      adnan-tech.com/create-and-read-excel-sheets-with-styles-and-dynamic-data-php-mysql/

    • @nivedisinghal8146
      @nivedisinghal8146 4 ปีที่แล้ว

      Adnan Afzal Okay thanks for the help

  • @pondybook7622
    @pondybook7622 5 ปีที่แล้ว +1

    Thanks bro,

  • @gnaneshgn8341
    @gnaneshgn8341 5 ปีที่แล้ว

    im new to php...and im have written the code as in the video..but even though im getting an error like Object not found after clicking upload..pls help...!!!!!!

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว +1

      It is because you have an error in file name spellings. Double check if your file name is same as in your code.

    • @gnaneshgn8341
      @gnaneshgn8341 5 ปีที่แล้ว

      ive checked....everything is correct .im getting error in "upload.php " and also can u please explain "move_uploaded_file($file["tmp_name"], "upload/".$file["name"]);" im confusedwith that...

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว +1

      @@gnaneshgn8341 It will save the file in server directory. Make sure you have a folder named "upload"

  • @jaedon01
    @jaedon01 3 ปีที่แล้ว

    nice one bro but how can i integrate it to the social site so if a user send message , friend request, group request and others the other will receive the sound notifications on his or her end?
    pls bro

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      For notification sound, you can follow this: th-cam.com/video/7mKXEiJu_Kg/w-d-xo.html
      It is HTML & Javascript, social network project is created in HTML & JS too, so you can integrate that with little work.

  • @albertganteng7261
    @albertganteng7261 3 ปีที่แล้ว

    Thank You

  • @ss11235
    @ss11235 5 ปีที่แล้ว

    I created the files just like you said and when i open it google chrome just shows me the code i typed and nothing else. I am new to coding and i am doing this in order to set-up a file share website on our IIS server for lab use.
    Your application is exactly what i am looking for.

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      You need to work in XAMPP htdocs

    • @ss11235
      @ss11235 5 ปีที่แล้ว

      @@AdnanAfzal565 Many thanks for the reply. I was using IIS and reached to a point where it would load the index.php page. When i upload file, i get error "This page isn’t working; 10.0.0.99 is currently unable to handle this request.
      ;
      HTTP ERROR 500"
      I will do some research about XAMPP and update the thread.

    • @ss11235
      @ss11235 5 ปีที่แล้ว

      ​@@AdnanAfzal565 I installed XAMPP on the server and it works beautifully. Thanks for the help.
      Just what we needed here.

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      @@ss11235 Yes, search for php.ini file in XAMPP/php folder. And search for max_upload_filesize

    • @preethaparthan531
      @preethaparthan531 5 ปีที่แล้ว

      @@AdnanAfzal565 Great info Can we add a delete file option next to the download links? Can you help with the code please.

  • @techprogramming9827
    @techprogramming9827 2 ปีที่แล้ว

    did this file goes into the database?

    • @AdnanAfzal565
      @AdnanAfzal565  2 ปีที่แล้ว

      No. It will only be saved physically in uploads folder.

  • @hammadahmad7293
    @hammadahmad7293 6 ปีที่แล้ว +2

    Helpfull (Y)

  • @javar1987
    @javar1987 3 ปีที่แล้ว

    Super nice

  • @TechNo1geek
    @TechNo1geek 3 ปีที่แล้ว

    I don't know how to get the localhost thingy

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      You can simply download XAMPP, WAMP or MAMP for localhost.

  • @soman5754
    @soman5754 5 ปีที่แล้ว

    where does the file upload to?
    and can i download even if its not on my computer?

  • @ananthucsh
    @ananthucsh ปีที่แล้ว

    can you please send the source code

  • @asikurbd
    @asikurbd 4 ปีที่แล้ว

    3 mb up file size. cannot be uploaded.. but why??

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      upload_max_filesize = 2M
      post_max_size = 2M
      Search these values in php.ini and update them to 10M or higher.

  • @user-qi3lv5og4v
    @user-qi3lv5og4v 5 ปีที่แล้ว

    Can someone tell me if i can make it online with free web hosting sites??

  • @twerwaneholisternersclub4216
    @twerwaneholisternersclub4216 4 ปีที่แล้ว

    thanks for this but my issue is i have a registration form but i want it to upload multiple files. any help

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      Yes, you can upload multiple files by following this:
      th-cam.com/video/eHEDJBk3ie0/w-d-xo.html

  • @area0312
    @area0312 ปีที่แล้ว

    Ty :)

  • @zerocruch
    @zerocruch 6 ปีที่แล้ว +1

    Please can you put the download file i need it

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      Sure. I will soon upload it on some git repository and will share link with you.

  • @techprogramming9827
    @techprogramming9827 2 ปีที่แล้ว

    so how i can uploaded into mysql database?

    • @AdnanAfzal565
      @AdnanAfzal565  2 ปีที่แล้ว

      You can save the path using following mysql query:
      INSERT INTO uploads(path) VALUES ($path)

    • @techprogramming9827
      @techprogramming9827 2 ปีที่แล้ว

      @@AdnanAfzal565 i already do this but its not working when i submit it will not go into the database

    • @techprogramming9827
      @techprogramming9827 2 ปีที่แล้ว

    • @AdnanAfzal565
      @AdnanAfzal565  2 ปีที่แล้ว

      Make sure you have correct database, table and column names.

  • @rufinohernandez1636
    @rufinohernandez1636 5 ปีที่แล้ว

    Funciona correctamente, necesito almacenar la ruta en una base de datos (MySQL)subiendo archivos .doc, .pdf con opciones para ver y descargar(Bueno eso la tiene en este ejemplo)...Alguna sugerencia !!

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      I didn't understand that. But I can tell that you are having problem in your MySQL database and may be unable to download or upload .pdf or .doc file ?

  • @hdmirswb
    @hdmirswb 3 ปีที่แล้ว

    Can I also use a button instead of the

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      Yes, to download files you can use an anchor tag.

  • @kerboplaytv8744
    @kerboplaytv8744 5 ปีที่แล้ว +1

    wow that into = like

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      I got it from here:
      www.fiverr.com/rizwanafzal1988/do-intro-video-for-youtube-of-caveman-breaking-stone?ref_ctx_id=11e71513-b629-48f5-a269-fc667f45e7dd

  • @djdamo6854
    @djdamo6854 6 ปีที่แล้ว +3

    pls code

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      Here it is:
      adnan-tech.com/tutorial/upload-download-and-delete-files-php

  • @takzobye
    @takzobye 4 ปีที่แล้ว +1

    How to upload a large file

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      You need to enable following 4 properties in your "php.ini" file located in "xampp/php/php.ini":
      upload_max_filesize - The maximum allowed upload file size.
      post_max_size - The maximum allowed POST data size.
      max_input_time - Maximum allowed input time.
      max_execution_time - The maximum allowed time the scripts are allowed to run.

    • @takzobye
      @takzobye 4 ปีที่แล้ว +1

      @@AdnanAfzal565 thanks

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      @@takzobye Welcome. Keep sharing.

    • @takzobye
      @takzobye 4 ปีที่แล้ว

      @@AdnanAfzal565 I dont have
      post_max_size
      max_execution_time
      max_input_time
      I only have upload_max_filesize

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      @@takzobye That's okay, it depends on server and PHP version. Try restarting XAMPP and it will work.

  • @wodosharlatan
    @wodosharlatan ปีที่แล้ว

    Is there a way to chech file size and than hande the info?

    • @AdnanAfzal565
      @AdnanAfzal565  ปีที่แล้ว

      Yes. You can use $_FILES["file"]["size"]. It will return the file size in bytes.

    • @wodosharlatan
      @wodosharlatan ปีที่แล้ว

      @@AdnanAfzal565 thx

    • @AdnanAfzal565
      @AdnanAfzal565  ปีที่แล้ว

      You are welcome.

  • @adamhaglund2223
    @adamhaglund2223 5 ปีที่แล้ว

    How do I add a delete button that deletes the file I want to rid of?

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      You can call built-in PHP function:
      unlink("path_of_file");
      to delete the file.

    • @adamhaglund2223
      @adamhaglund2223 5 ปีที่แล้ว

      @@AdnanAfzal565 Ok, but how do I "grab" the full name from the script and get it into the unlink("full_name.here")?

  • @ss11235
    @ss11235 5 ปีที่แล้ว

    Can you please help with the code for a banner on top of index.php page

  • @_etg
    @_etg 3 ปีที่แล้ว

    Hey do you know how to put images and description for the uploaded files?

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      Yes, just create another column in database with description of images.

    • @_etg
      @_etg 3 ปีที่แล้ว

      Also thanks for this video it helped me

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      You are welcome.

  • @mukrihome
    @mukrihome 4 ปีที่แล้ว

    whenever i am downloading its say failed no file

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      Make sure the path of file in server is correct. You need to give full file name including the extension.

  • @jokerry9627
    @jokerry9627 6 ปีที่แล้ว

    I used the upload.php in the end of the file, the last 2 lines, the code cannot download any file. Note: I used it to my website not for local host.
    upload file

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      Just print_r($files) and see the files returned.

    • @jokerry9627
      @jokerry9627 6 ปีที่แล้ว

      Failed- No file

    • @jokerry9627
      @jokerry9627 6 ปีที่แล้ว

      Failed - No File

    • @jokerry9627
      @jokerry9627 6 ปีที่แล้ว

      outp put is :
      New Text Document (9).txt
      Array ( [0] => . [1] => .. [2] => New Text Document (9).txt
      so, when I click on the > its output is:
      Failed - No File

  • @veenisazta1582
    @veenisazta1582 6 ปีที่แล้ว +1

    How we can download files from file zila to local server ?

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      You can right click on file you want to download and click "export to local"

    • @veenisazta1582
      @veenisazta1582 6 ปีที่แล้ว

      Adnan Afzal I want to download complete folder from file zila (sftp protocol) to local server using php

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      Okay. I will shortly provide you tutorial for that too.

    • @veenisazta1582
      @veenisazta1582 6 ปีที่แล้ว +1

      Adnan Afzal thank u ...

    • @AdnanAfzal565
      @AdnanAfzal565  6 ปีที่แล้ว

      here is your requested tutorial: th-cam.com/video/91glKPKpogE/w-d-xo.html
      please let me know if you have any issues

  • @abhithakur5403
    @abhithakur5403 3 ปีที่แล้ว

    Hello, how can i upload in sketchware

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      You need to develop a new app for this, sketchwsre is quite different. You can follow this:
      adnan-tech.com/profile-update-with-picture-android-java-php-and-mysql/

  • @reskyantopaledangmailcom
    @reskyantopaledangmailcom 3 ปีที่แล้ว

    good tutorial

  • @fmfeldsalat8744
    @fmfeldsalat8744 3 ปีที่แล้ว

    Thanks This is a very usefull tutorial but i have a question how can i run it on a server becouse i want to upload a file on my pc and download it on a nother pc. it would be very nice if somone can help me. (sorry for my bad english :) )

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      You can simply upload this code to a hosting server. Upload the file from 1 PC. Access the web page from 2nd PC and download the file.

  • @saiqajutt5550
    @saiqajutt5550 3 ปีที่แล้ว

    not working ..

  • @Ember_magyar
    @Ember_magyar 2 ปีที่แล้ว

    it working in html file?

    • @AdnanAfzal565
      @AdnanAfzal565  2 ปีที่แล้ว

      No, you have to use php file.

  • @williamchangco833
    @williamchangco833 3 ปีที่แล้ว

    I love you

  • @mas_lum
    @mas_lum 5 ปีที่แล้ว

    kalo untuk menghapus file bagaimana ?

    • @AdnanAfzal565
      @AdnanAfzal565  5 ปีที่แล้ว

      gunakan fungsi unlink (file_name)

  • @updatebd6977
    @updatebd6977 3 ปีที่แล้ว

    Nice code

  • @muhammadiqbalkaplale8220
    @muhammadiqbalkaplale8220 3 ปีที่แล้ว

    terima kasih, sangat berguna. tapi untuk menghapus masih tidak berfungsi.

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      kesalahan apa yang Anda lihat?

    • @muhammadiqbalkaplale8220
      @muhammadiqbalkaplale8220 3 ปีที่แล้ว

      @@AdnanAfzal565 tidak muncul pesan kesalahan. tolong berikan tutorial penggunaan unlink untuk penghapusan file. terima kasih

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      @@muhammadiqbalkaplale8220 tutorial ini memiliki fungsi unlink. periksa apakah Anda memiliki izin menulis.

  • @karukkuvelraja8179
    @karukkuvelraja8179 5 ปีที่แล้ว

    Internal server error

  • @chandrapratama7644
    @chandrapratama7644 3 ปีที่แล้ว

    Not use Database ??

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      You mean you want to download the file saved in the database? And save the uploaded file path in the database?

    • @chandrapratama7644
      @chandrapratama7644 3 ปีที่แล้ว

      @@AdnanAfzal565 yes I want to download and upload the save file in the mysql database, can you know your script can be used in the database ??

    • @AdnanAfzal565
      @AdnanAfzal565  3 ปีที่แล้ว

      You can follow below tutorial to fetch and save data in database:
      th-cam.com/video/oie6T8IVeMA/w-d-xo.html

    • @chandrapratama7644
      @chandrapratama7644 3 ปีที่แล้ว

      @@AdnanAfzal565 oke tanks for to be information

  • @robertoaguiar6230
    @robertoaguiar6230 4 ปีที่แล้ว

    Can I do that with just html?

    • @AdnanAfzal565
      @AdnanAfzal565  4 ปีที่แล้ว

      You can do the download with HTML. But upload cannot be done with only HTML.