Working With File System In PHP - Full PHP 8 Tutorial

preview_player
Показать описание
In this PHP tutorial, you will learn how to work with files & filesystem in PHP. You will learn how to create & delete directories, open files, put content, read content, read files line by line, read CSV files, some tips & things to be aware of such as return value caching for some of the file related functions.

SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
👍 Smash the like button
🤝 Subscribe to the channel & turn the notifications on
💬 Post comments, any feedback is greatly appreciated
THANK YOU!

LESSON 1.30

RESOURCES

CHAPTERS
00:00 - List of all files & directories - scandir
00:44 - Check if file is a directory or a file - is_dir / is_file
00:58 - Create & delete directories - mkdir / rmdir
02:02 - Check if file or directory exists & print filesize - file_exists / filesize
02:28 - Clear cached values of functions like filesize - clearstatcache
03:30 - Open files & resource data type - fopen
04:25 - Using error control operator to suppress warnings
05:25 - Read files line by line - fgets / fclose
06:25 - Read csv files - fgetcsv
07:02 - Get file contents & store in a variable - file_get_contents
07:57 - Write content to a file - file_put_contents
08:50 - Delete, copy, rename & move files - unlink / copy / rename
09:34 - Get information about a file - pathinfo
Рекомендации по теме
Комментарии
Автор

This series is really good for the people that want learn the basics of PHP before going deep into a framework.
I dont really need it, but this is a big help to other people.
Thank you

JohnnyBigodes
Автор

You're a fantastic teacher. Your delivery in this short video was excellent. 😮

faisalahammad
Автор

This is amazing. I was nowhere near the professional solution that you provided. I obviously have a lot of work to do!

illegalsmirf
Автор

Thansk you so much. Ive had watched some other courses about php like bro code. Your course is much more complicated. Its harder to understsnd and for me as a person who has never done a serious job in php in some how hard to understsnd how can i use this knowledge in real world and for example in a company . I feel like i know nothing !!!!

MaziarHeidari-ie
Автор

These overviews are really useful. I build php projects infrequently and often need quick revision if it's been a long time since my last php project and find a few minutes spent on your video for a topic saves me lots of time. Thanks.

batchrocketproject
Автор

Really amazing course, and I feel if you do this first section, a lot of other languages will get easier, I already found a lot of similarities with go, node and a lot other languages

whisperscribe
Автор

Thank you gio, I'm still learning from here.

udayan
Автор

Hello,
Cool explanation of the files related methods.
Thank you!

Some thoughts - maybe we need some video about SplFileInfo class - it useful with files.
But yes, it's already OOP section.

AlexFloppy
Автор

Yeah, it's pretty useful to know how to handle file system. Thanks!

Vitalii-mr
Автор

Amazing tutorial. This tutorial is very important for beginners.

asmotovlogs
Автор

oh, I was too late with the comment on the last video :-) But really this video is again a masterpiece of tutorials. Best PHP-Tutor ever!

lairotuT-Tutorial
Автор

Hi Gio, I would suggest you to also create videos on PHP Streams and stream related functions. There are so many concepts in there to know and understand. Thanks for your amazing video lessons!!

aryank
Автор

Great course, Gio. kudos. However, one thing that is kind of very annoying is the audio jump cuts. Everything feels rushed when there is no pause between sentences .

bigorstojanov
Автор

@Gio, have been following from the scratch. Please what are the major differences between
the fgets() and file_get_contents().

mimoh
Автор

In the 6th min on line 13, I tried to write to while condition just by frets function itself, without assigning it to $line .
Actually it works . But I'm loosing some lines of my file compared with the way you do it. And I don't know why. Do you have any idea?

MaziarHeidari-ie
Автор

Hello Sir, am really grateful for this series, I have been following the course from the begining and don't even want to miss a single video, meanwhile, I get stuck when i tried to make directory on the mac osx am using. this is the error am getting (Warning: mkdir(): Permission denied in on line 26).
Please help. Thank you.

jimmymomoh
Автор

im getting a number instead of a string for each line

MochilasWayuuBags