I have been looking for contents to learn mvc in php... Its 6 am here, i just woke up and again i searched for contents to learn mvc ... Thankfully for first time i got something helpful, something which i am able to easily understand
In the first 2 or three videos I thought you are little bit slow, but when I heard your story, it gave me a sync as I have also faced same issues in beginning, so I decided to go through this course, in this video I got fan of your teaching skills, these are more than professional one, nobody teach taking into consideration directory structures or server paths, all start from "Hello World" like apps. In nutshell, I will say this course is good for beginners as well as experience users. Checking each line is awesome approach. Thanks
OMG this is your YT channel! I thought it was one of those ripped Udemy video's. I'm a big fan of your teaching skills. They're just on point! Top of the line. Big fan.
I have been watching programming videos for few years and I do it often, I love youtube. Your videos are very good, You explain shit in a way that programming needs to be explained, so far so good. I havent grasped the MVC where I can do it alone yet, I am hoping your series can help me start to produce my own framework.
PATH_INFO isn't always set. It is only set if there was trailing path info after the script. For example if you have a file located here: localhost/index.php And you access it via this url: localhost/index.php/foo/bar then $_SERVER['PATH_INFO'] will be set to a value of "/foo/bar"
In 2021 'PATH_INFO' was not available and could not be turned on (no AcceptPathInfo directive). So I used the 'REQUEST_URI' tip below then removed the first array element so that it is equivalent
Hey. Do I really need to use the defined Directory Separator? I just read at StackOverflow that PHP accepts both \ and / as valid path separators in all OS. So what is the use of it?
Hey Curtis, Great job, wish you all success. I have a problem getting my project to redirect the path to index.php when there is any text added after localhost/ruah/ it just gives 404 error. I followed your videos up to the DB wrapper but I still have this problem persisting. Please let me know if you need any more info. Thanks
hello @Curtis Parham how does one change the router url to add a dash or hyphen in the class core view under the function render? ex of url: www.example.com/dev-tuts instead of only allowing _ underscores ? for example with the way classes are setup the instantiation or structure of the mvc only allows underscore in url ex www.example.com/dev_tuts please someone reach out to me if you know how to modify the url to add hyphens or dashes thanks ! have a good day folks!
There should be no quotes on magic constant '__FILE__' , just __FILE__ and its two underscores not one, on either side. define(ROOT, dirname(__FILE__));
i already solved it, problem was about url, ex: localhost/app/user/register. i was getting this error while trying to make it working with this one : localhost/app
@@shrikanttiwari907 PATH_INFO isn't always set. It is only set if there was trailing path info after the script. For example if you have a file located here: localhost/index.php And you access it via this url: localhost/index.php/foo/bar then $_SERVER['PATH_INFO'] will be set to a value of "/foo/bar"
lol...yeah. Probably not necessary unless someone is doing this on an older windows machine or server where the directory seperator is '\' instead of '/'
I have been looking for contents to learn mvc in php... Its 6 am here, i just woke up and again i searched for contents to learn mvc ... Thankfully for first time i got something helpful, something which i am able to easily understand
In the first 2 or three videos I thought you are little bit slow, but when I heard your story, it gave me a sync as I have also faced same issues in beginning, so I decided to go through this course, in this video I got fan of your teaching skills, these are more than professional one, nobody teach taking into consideration directory structures or server paths, all start from "Hello World" like apps. In nutshell, I will say this course is good for beginners as well as experience users. Checking each line is awesome approach. Thanks
OMG this is your YT channel! I thought it was one of those ripped Udemy video's. I'm a big fan of your teaching skills. They're just on point! Top of the line. Big fan.
I have been watching programming videos for few years and I do it often, I love youtube. Your videos are very good, You explain shit in a way that programming needs to be explained, so far so good. I havent grasped the MVC where I can do it alone yet, I am hoping your series can help me start to produce my own framework.
What a greate content to learn PHP MVC?. Thank you sir.
Hey Curtis I think your tutorials are great - thanks so much
For those who is on hostgator or godaddy shared hosting: $_SERVER does not have "PATH_INFO" element. Use "REQUEST_URI".
Apache 2 users may use AcceptPathInfo = On inside httpd.conf to define PATH_INFO.
PATH_INFO isn't always set. It is only set if there was trailing path info after the script.
For example if you have a file located here: localhost/index.php And you access it via this url: localhost/index.php/foo/bar
then $_SERVER['PATH_INFO'] will be set to a value of "/foo/bar"
yes, but in the case of this application we will never be accessing index.php. path_info gives us the necessary information for our url structure.
Thank you sir
welcome back!
In 2021 'PATH_INFO' was not available and could not be turned on (no AcceptPathInfo directive). So I used the 'REQUEST_URI' tip below then removed the first array element so that it is equivalent
Hey. Do I really need to use the defined Directory Separator? I just read at StackOverflow that PHP accepts both \ and / as valid path separators in all OS. So what is the use of it?
Hey Curtis,
Great job, wish you all success.
I have a problem getting my project to redirect the path to index.php when there is any text added after localhost/ruah/ it just gives 404 error. I followed your videos up to the DB wrapper but I still have this problem persisting. Please let me know if you need any more info. Thanks
It sounds like you have an error in your .htaccess file. Please go back and watch that video again and check every character very carefully
Awesome thanks alot
I like the elegent way of getting the URL :D
but doesn't it needs validation or sanitization ?
Awesome thanks alot
Happy to help
What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['REQUEST_URI'] ??
hello @Curtis Parham how does one change the router url to add a dash or hyphen in the class core view under the function render? ex of url: www.example.com/dev-tuts instead of only allowing _ underscores ? for example with the way classes are setup the instantiation or structure of the mvc only allows underscore in url ex www.example.com/dev_tuts please someone reach out to me if you know how to modify the url to add hyphens or dashes thanks ! have a good day folks!
There should be no quotes on magic constant '__FILE__' , just __FILE__ and its two underscores not one, on either side.
define(ROOT, dirname(__FILE__));
Hi how could i configure nginx like configure .htaccess with apache?
www.winginx.com/en/htaccess
@@CurtisParhamFreeSkills I'm going to try. Thanks
change your code to - define('ROOT',dirname(dirname(__FILE__)));
I have a problem with defining the path_info. Notice: Undefined index: PATH_INFO in C:\xampp\htdocs\projectApp\index.php
Can somebody help me?
i already solved it, problem was about url, ex: localhost/app/user/register. i was getting this error while trying to make it working with this one : localhost/app
MrCikkilti I am getting same problem, could you please tell me how to resolve it.
@@shrikanttiwari907
PATH_INFO isn't always set. It is only set if there was trailing path info after the script.
For example if you have a file located here: localhost/index.php And you access it via this url: localhost/index.php/foo/bar
then $_SERVER['PATH_INFO'] will be set to a value of "/foo/bar"
This is good, for people who know what the fuck is actually going on. You're moving to fast for me.
Only geniuses turn '/' into 'DS'. 🤣🤣🤣
lol...yeah. Probably not necessary unless someone is doing this on an older windows machine or server where the directory seperator is '\' instead of '/'