55: Delete more than one file or image in PHP - PHP tutorial

  Рет қаралды 36,751

Dani Krossing

Dani Krossing

Күн бұрын

Пікірлер: 40
@akashgola2153
@akashgola2153 7 ай бұрын
Nice logic kinda figured what u gonna do halfway ,now with each video i am learning something new like hey that's where u use 'string.replace or unlik, or glob' etc. Cool
@tor0most3r47
@tor0most3r47 6 жыл бұрын
the script become easier if you use a foreach loop instead the for loop, and using the all the first loop you can control and delete the files
@Julio860JVL
@Julio860JVL 4 жыл бұрын
On previous tutorials you used die() instead of exit(). I did a quick Google search and both functions do the same. Is there an specific reason why you used exit() in this tutorial but used die() on all of the other tutorials? Thanks for the videos btw! Cheers!
@jeremy_s
@jeremy_s 7 жыл бұрын
Thanks for your tutorials, found and LOVE your channel. Especially this PHP series, It would be great to see a cURL tutorial, and connecting with API's tutorial in the future :) Cheers!
@maulahaz
@maulahaz 5 жыл бұрын
Thanks.. your tuts solving my problem.
@abdoalaasadik
@abdoalaasadik 4 жыл бұрын
really liked your tutorial
@ДаниилКиселев-к3к
@ДаниилКиселев-к3к 8 жыл бұрын
Very helpful. Thanks
@Dani_Krossing
@Dani_Krossing 8 жыл бұрын
Thanks :)
@calvinchong5179
@calvinchong5179 7 жыл бұрын
Thanks for your tutorials, now I think I can code a php file that can delete my friend's dota2 root folder.
@SKYBAUSK
@SKYBAUSK 4 жыл бұрын
and tell me how , this code is only for separatet files not a folders...
@ComputerHelpHawaii
@ComputerHelpHawaii 4 жыл бұрын
Question about the first for loop on line 7. You said you're just looking to see if it exists so wouldn't in_array be faster?
@turbosardar39
@turbosardar39 4 жыл бұрын
But how would you know what file is missing using in_array? I think with for loop you can even print this missing file.... I'm not you can do that with in_array. If you can please explain cause I'm new to php and that would be helpful. Thanks!
@ComputerHelpHawaii
@ComputerHelpHawaii 4 жыл бұрын
@@turbosardar39 It's been a while since I've watched this but whatever file you're looking to see if it exists is the one that exists. In other words you're comparing the array to something,. That something is the file.
@turbosardar39
@turbosardar39 4 жыл бұрын
@@ComputerHelpHawaii the video is about deleting multiple files...so we need if all files exists...if it was only one file in that case in_array would be efficient...but in case of multiple files i think for loop is more efficient as you can even print the name of the missing file.
@ComputerHelpHawaii
@ComputerHelpHawaii 4 жыл бұрын
@@turbosardar39 I don't know. Do you want a foreach loop going through each file looking for a match or do you just want to know if it exists, but jmo for what it's worth. I'm so busy I may have misinterpreted and you could be absolutely correct. Good luck with your education process which by the way never ends :-)
@ngjhunnen
@ngjhunnen 8 жыл бұрын
you are so great ... thank you sir
@ribaljeanhaddad3630
@ribaljeanhaddad3630 4 жыл бұрын
can you make a video how to delete multiple data and image from database and folder using checkbox thx
@davidshefcik
@davidshefcik 8 жыл бұрын
Hey. I was just wondering what is the name of your keyboard? :p
@kartikraj6629
@kartikraj6629 6 жыл бұрын
What is your code editor name...???
@kartikraj6629
@kartikraj6629 6 жыл бұрын
Thank u...😊
@Shiheha
@Shiheha 6 жыл бұрын
in 11:34 , if the "if statment" is true , we go to header and to another page ( index.php) and leave this page (and this loop ) , why we need the "exit() " function ?
@ComputerHelpHawaii
@ComputerHelpHawaii 4 жыл бұрын
I have an exit function after calling another script just in case in one of my more recent scripts.
@appiahemmanuel490
@appiahemmanuel490 4 жыл бұрын
Thanks for your good work done, but i would like you to assist me in building a tracking system. i will be looking forward to hear from you thanks.
@akhilkazi1454
@akhilkazi1454 4 жыл бұрын
Hello sir i want to use this code in table row for deleting rows. Help me.
@АртемВолков-ю5ь
@АртемВолков-ю5ь 8 жыл бұрын
Cool
@princemawan8152
@princemawan8152 6 жыл бұрын
Hi i have "permission denied error on unlink function" what should i do?
@SKYBAUSK
@SKYBAUSK 4 жыл бұрын
whitch line mus be edited for delete folders. I need deleted folder not only files ..
@nextinline619
@nextinline619 6 жыл бұрын
Hey, can't I just use the file selector and select the file and post it out to the deletefile.php and get the name of the file through $file['name'] and make the path this : $path = "uploads/".$filename; then I can unlink the file like I did in the previous video. why would I need to do so much work and type out each file name in order to delete files? shouldn't I just select them through the file selector?
@unzudgeo
@unzudgeo 6 жыл бұрын
I was thinking the same thing. Did you implement this idea? I am going to have a go at it...
@unzudgeo
@unzudgeo 5 жыл бұрын
@yusef 258 thanks bro
@yungifez
@yungifez 4 жыл бұрын
8:15 can you not like use a for each loop instead of using that method
@Thadnill
@Thadnill 4 жыл бұрын
how do I delete a certain line/object from a txt file? I am creating my guest book with OOP PhP, and I am trying to solve my delete button, where I delete a chosen post, each post is it's own html table row, and I also want to delete the object within the txt file (my database), but I am completely stuck and could use some tips..
@turbosardar39
@turbosardar39 4 жыл бұрын
Have you solved it?
@Thadnill
@Thadnill 4 жыл бұрын
@@turbosardar39 yeah I did :) you having the same problem?
@thasan4509
@thasan4509 8 жыл бұрын
What if I enter index.php to filename?
@Dani_Krossing
@Dani_Krossing 8 жыл бұрын
Thasan That won't work since we are searching inside the uploads folder. However to make it completely safe I would recommend also doing a check to make sure only certain files with specific extensions can be deleted.
@thasan4509
@thasan4509 8 жыл бұрын
mmtuts oh.. thats true, didint noticed it was on upload folder.. So, ../index.php
@Dani_Krossing
@Dani_Krossing 8 жыл бұрын
Thasan Yeah I thought about the ../ before going to bed. I would create an error handler identical to the str_replace we did in this episode that removes any ../ from the string :)
@Dani_Krossing
@Dani_Krossing 8 жыл бұрын
I just added an annotation to the video that shows how to avoid users going back a folder :) Thanks for pointing it out.
@eki8096
@eki8096 7 жыл бұрын
i got permission denied :/
56: Search for full file name in PHP tutorial - PHP tutorial
5:03
Dani Krossing
Рет қаралды 34 М.
Random Emoji Beatbox Challenge #beatbox #tiktok
00:47
BeatboxJCOP
Рет қаралды 59 МЛН
The Singing Challenge #joker #Harriet Quinn
00:35
佐助与鸣人
Рет қаралды 29 МЛН
Elza love to eat chiken🍗⚡ #dog #pets
00:17
ElzaDog
Рет қаралды 24 МЛН
53: Delete profile image using PHP - PHP tutorial
22:37
Dani Krossing
Рет қаралды 46 М.
Ajax Multiple Image Upload with Edit Delete using PHP Mysql
48:54
How to delete file in php (php unlink)
7:53
WCoderZone
Рет қаралды 33 М.
Multiple images uploading and display from database in PHP with Mysql
20:16
Should You Learn Object Oriented PHP?
13:48
Dani Krossing
Рет қаралды 11 М.