PHP OOP Login/Register System: Initialization (Part 4/23)

preview_player
Показать описание

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

this is one of the better series available on youtube, very well put together

rsdntevl
Автор

Looks like i finally found a nice tutorial which suits my needs. Thank you for the well structured approach, and for all the side informations through out the Videos. That's all very helpful!

dippydawg
Автор

If this source code is available for open source, it can be a awesome core php framework and most likable and adoptable by many junior, middle and senior php engineers.

ahesanalisuthar
Автор

Great tutorial and I actually used the code in several projects, the only change I made in this video is not storing the DB credentials as global variables, for security reasons I put them as private properties in the DB class, having them as globals could be a security risk in case globals got dumped for some reason when errors occur and the username and pass will be revealed. I don't know if Alex agrees with me on that

NTCco
Автор

When I was about to think adding cookies attribute for my login section then this video came to me, really thx

kewondwego
Автор

If someone needs to require file to another directory, just put in init.php file, function file_exists()

($class){

require_once '../classes/'.$class.'.php';
} else{
require_once 'classes/'.$class.'.php';
}
});

and big thanks Alex

SickBassTV
Автор

When you define the spl_autoload_register function, you have to take into consideration the place where you will call the function and modify the paths of files accordingly. Thus, you will not face problems such as 'Failed to open stream'.

mahmoudel-hawawshy
Автор

Hi,

Mine is kicking out the same errors had to use:

require_once 'classes/config.php';
just to get the bloody thing to work.

If it starts like this I cant wait till for the next few videos :)

Cheer,
Paul

TheHashmi
Автор

Really looking forward to the rest of this series.

bluecafe
Автор

Agreed - was looking forward to this series until I saw this. Surely we could create our database details within the db class??

daveodwyer
Автор

Hi Alex! It would be great if you could expand this system further by creating custom pages and sub pages! Cheers :)

Jaenotan
Автор

Well, you could include functions and etc. with foreach scandir

ArnoldsKtm
Автор

Thank you so much for this educational journey, can't tell you how much of help these series are to me!
Re: spl_auto_register function - the $class varible was returning 'Config.php' (capital C) . I fixed it with: $class = strtolower($class); Any idea what this could be?

liketocode
Автор

These videos have helped me tremendously. Thank you. I do have a question dealing with directory hierarchy when using a Mac. Specifically, when I try to require or include a file in another directory (require_once 'core/init.php';) it doesn't work but if I include a file in the same directory (require_once 'login.php';) it works fine. I have my directories set up just like the video but it seems there is an issue with the directory hierarchy or possibly permissions. Anyone know what my issue could be?

CoryWCordell
Автор

Hey, You'll get an error on line 24. because it should be: required_once '../functions/sanitize.php';. Because the file in which you work init.php is in the core folder, so you need to go back. Is it?

plotservice
Автор

Part 3 was out yesterday. Parts 1, 2 and 3

Knards
Автор

Stupid question but why do you never end the PHP file with ?> Is this because of the way the files will be included later? 

waldo
Автор

I am still confused with the cookie expiry here.. what does 604800 mean? can't find the information on the web...

pianoLee-sxdx
Автор

If we call session start in the init file, then every time I load a file into another, I start the session again causing a warning... How do you deal with loading the core/init.php file on everypage but not trying to start the session again when we load an external file that contains require_once 'core/init.php';

moosalini
Автор

The previous video upload was due to it being accidentally deleted.
It was "PHP Tutorials: Register & Login" which is an older tutorial whereas this series is "PHP OOP Login/Register System".
I got confused too. Worst timing! :P

GazMan