Beginner PHP Tutorial - 78 - File Handling: Reading a File

  Рет қаралды 93,936

thenewboston

thenewboston

Күн бұрын

Пікірлер: 72
@Dutchmonkey
@Dutchmonkey 12 жыл бұрын
For those who still haven't figured it out. Vid 78 and Vid 79 are switched.
@richardgenck2692
@richardgenck2692 8 жыл бұрын
These are GREAT!! I'm sharing this with my friends, you might want to rename this and the next video though, this one should probably be 79, and 79 should be 78.
@anthonyrosamilia3498
@anthonyrosamilia3498 10 жыл бұрын
I find one of the main issues in learning multiple languages is knowing when a standard function creates an array of data or another form of data. It makes you have to memorize so much!
@jasbirsingh1729
@jasbirsingh1729 8 жыл бұрын
Your videos are great man. I did php in the college But my professor taught nothing. Only because of you I am good with PHP
@AnthonyVipond
@AnthonyVipond 11 жыл бұрын
Keep in mind, file() does not work for large files as it reads it all into memory. Imagine using file() on 1 GB log files...
@reshetech
@reshetech 13 жыл бұрын
You have the best PHP tutorial on the net. Thank you so much!
@BBSKN
@BBSKN 12 жыл бұрын
Instead of initializing $count to 1, you can increment $count before the if condition inside the foreach loop. Same effect, but some what more logical since 0 names have been cycled through before the loop begins.
@McGavel1
@McGavel1 9 жыл бұрын
Awesome man, thanks! I'm trying to make an online poker hand reviewer from a downloaded hand history text file and this is just what I needed. Gonna check out some other videos too. Peace and good luck.
@McGavel1
@McGavel1 9 жыл бұрын
+McGavel1 PHP has so many sweet built-in functions - I love it.
@Weegee4458
@Weegee4458 11 жыл бұрын
7:37 "oh dear.." xD
@Gustavo81988
@Gustavo81988 12 жыл бұрын
A little improvement would be: foreach($readin as $fname){ echo trim($fname); if($count
@Brax1982
@Brax1982 9 жыл бұрын
How about not counting at all and instead using a string variable "s" on which you concatenate everything in the loop, then once the loop is done, remove the excess comma and maybe whitespace, then echo "s"?
@billgates4156
@billgates4156 9 жыл бұрын
for those people finding this video confusing...its an uploading error..first of all watch tutorial 79 and come back..Makes sense
@technoooooofreak
@technoooooofreak 7 жыл бұрын
All the pain he took to remove a trailing comma! Programming is indeed funny! xD
@shawnfrank1522
@shawnfrank1522 11 жыл бұрын
increment count ++ before the if statement, then you can keep count 0 initially.
@johnjacob9225
@johnjacob9225 11 жыл бұрын
Before u watch this watch 79.. Videos just got mixed.. Watch 79 then 78.
@jesselisser
@jesselisser 10 жыл бұрын
Haha love it!! Off by one error :D Great vid
@deepgagan9015
@deepgagan9015 8 жыл бұрын
nice explanation alex sir !
@REALCOOLLIKEVIPUL
@REALCOOLLIKEVIPUL 12 жыл бұрын
Since you want to add "AND" after second last name, so you used readin_count-1. nice work
@desmondloo9695
@desmondloo9695 7 жыл бұрын
i face a problem where when i direct till the last folder ,it does not show the file i have in the folder but open the file straight
@xxiRaQiAtheistxx
@xxiRaQiAtheistxx 12 жыл бұрын
Jump up one lesson more 79, and come back later to this one! lol
@Robstercraw
@Robstercraw 10 жыл бұрын
are these out of whack? in the last video no such form was created.
@Ashbrringer
@Ashbrringer Жыл бұрын
The course is great! But it would be a good thing to rename this video to 79, because the Appending is done in the next one.
@vu2arm
@vu2arm 6 жыл бұрын
How to create sequence of file on directory in php while name are store in text file
@dostmusician
@dostmusician 11 жыл бұрын
tut-79 should come before this one(tut-78). watch that first,and then you would understand this one.
@VanyaD
@VanyaD 11 жыл бұрын
Gosh, why isn't this stuff working for me?????? Only the form opens up, but no file is created or written into and my code is one by line the same as Alex's!!!
@hassanbaiga
@hassanbaiga 12 жыл бұрын
Sandra returned you with an error, she betrayed you man !!!!!
@Balaclavaz
@Balaclavaz 11 жыл бұрын
When I echo out I get the word "Array" before the first name, which is replaced by a "1" when I do $count = 1. I don't know what I'm doing wrong to get that. The $count business seems a long winded way of removing a final comma
@Balaclavaz
@Balaclavaz 11 жыл бұрын
fixed it; a stray comma instead of a semi-colon after echoing current name in field
@bujunjeri1963
@bujunjeri1963 8 жыл бұрын
cool tutorial bt my trim seems not to be working { echo trim($fname); }
@luqmanafridi333
@luqmanafridi333 8 жыл бұрын
well good job SIR !!!!
@melanshrestha6331
@melanshrestha6331 8 жыл бұрын
can this be used for comment purpose in the website?
@namelast-name616
@namelast-name616 8 жыл бұрын
yes i have a code which i found long time ago cuz i didn't knew hanything in php, but now i watch this tutorials and see how easily it was created
@rahulgaur7003
@rahulgaur7003 8 жыл бұрын
clear concept .
@gabrielkdc17
@gabrielkdc17 8 жыл бұрын
Shouldn't you use httpentities?
@BrasiLIndomaveL
@BrasiLIndomaveL 12 жыл бұрын
I wrote this, but I don't quite understand why it works. Somebody could explain to me? foreach($readin as $fname) { echo trim($fname); if ($count
@shourabhpayal1198
@shourabhpayal1198 8 жыл бұрын
THIS VIDEO IS LIL MESSED UP
@Capovila21
@Capovila21 9 жыл бұрын
Thanks so much!
@mockingbird3809
@mockingbird3809 7 жыл бұрын
If you not understand it first watch 79 before this
@ciaranwhyte4088
@ciaranwhyte4088 9 жыл бұрын
if($count != $fileCount) { echo ', '; } That original code was perfectly fine, all he needed to do was change count to a 1
@MrMagnat86
@MrMagnat86 9 жыл бұрын
OMG, maybe count++; must be before inner if.
@trueredexe
@trueredexe 12 жыл бұрын
After using JSP for all this php feels like childs play
@cjvaans4484
@cjvaans4484 11 жыл бұрын
Wha!? What the heck did I miss!? Oh. Videos are just mixed up.
@mmafanuk
@mmafanuk 11 жыл бұрын
I have no idea what just happened
@Martin870620
@Martin870620 12 жыл бұрын
I paused the video and figure out the problem like this: if(($count + 1) < $readin_count){ echo ', '; } Which is the same thing but simply changing the variable to 1 is definitly the beter way to do this.
@vyuutuube
@vyuutuube 9 жыл бұрын
whuhahaha i tried to scroll the scrollbar of your video to look at your code below... am i the only one trying that by accident or do you people recognise this? :) :) :)
@tiradorphilippinez6149
@tiradorphilippinez6149 11 жыл бұрын
nice tutorial , you've lean a lot if you stick in his lesson
@trueredexe
@trueredexe 12 жыл бұрын
Indeed.
@hussi0o
@hussi0o 11 жыл бұрын
because u need to write $_POST (not $_post)
@SuperSlashpwn
@SuperSlashpwn 13 жыл бұрын
@andreyfschoier Thanks Mate :)
@baohuynh562
@baohuynh562 13 жыл бұрын
Oh dear!
@tuananhha
@tuananhha 10 жыл бұрын
Very difficult to understand!
@zwich
@zwich 13 жыл бұрын
@arvids817 ty saved some time ;D
@dibraniuk
@dibraniuk 6 жыл бұрын
need do validation first
@Rashmeed
@Rashmeed 11 жыл бұрын
This is a bad and slow way, use this: echo file_get_contents("names.txt");
@mastermax7777
@mastermax7777 13 жыл бұрын
@baohuynh562 lol
@RahilWazirAli
@RahilWazirAli 12 жыл бұрын
mistakes are made by humans, its okay!
@laurisskraucis2247
@laurisskraucis2247 11 жыл бұрын
that isnt good to say that
Beginner PHP Tutorial - 79 - File Handling: Appending a File
6:59
thenewboston
Рет қаралды 70 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
php file open read and close ||  php fopen function - 1
16:00
WCoderZone
Рет қаралды 10 М.
File handling in php in Tamil | Programmer JK
13:02
Programmer JK
Рет қаралды 4,5 М.
Beginner PHP Tutorial - 67 - Detecting a Visitors Browser Part 1
6:36
Предел развития НЕЙРОСЕТЕЙ
18:53
Onigiri
Рет қаралды 212 М.
PHP File Handling with complete example programs
11:44
Biabani Study Tutorials
Рет қаралды 574
Beginner PHP Tutorial - 82 - File Handling: Listing Files Part 1
5:30
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 787 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН