Index.php

Поделиться
HTML-код
  • Опубликовано: 26 авг 2024
  • Learn to build a MVC PHP framework from scratch.

Комментарии • 36

  • @AnkitKumar-ow6fg
    @AnkitKumar-ow6fg 5 лет назад +2

    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

  • @bawagrafix
    @bawagrafix 4 года назад +2

    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

  • @coldmow
    @coldmow 6 лет назад +5

    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.

  • @sfcoxcms2445
    @sfcoxcms2445 7 лет назад +1

    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.

  • @markomeje9640
    @markomeje9640 5 лет назад +2

    What a greate content to learn PHP MVC?. Thank you sir.

  • @BarnabyPerrinAldous
    @BarnabyPerrinAldous 7 лет назад +3

    Hey Curtis I think your tutorials are great - thanks so much

  • @RovshanMamedov
    @RovshanMamedov 5 лет назад +4

    For those who is on hostgator or godaddy shared hosting: $_SERVER does not have "PATH_INFO" element. Use "REQUEST_URI".

    • @alexlazarification
      @alexlazarification 5 лет назад +1

      Apache 2 users may use AcceptPathInfo = On inside httpd.conf to define PATH_INFO.

  • @fortunefintechit4488
    @fortunefintechit4488 5 лет назад +1

    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"

    • @CurtisParhamFreeSkills
      @CurtisParhamFreeSkills  5 лет назад +1

      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.

  • @marvinbuisa9971
    @marvinbuisa9971 2 года назад

    Thank you sir

  • @xbwxxy
    @xbwxxy 7 лет назад

    welcome back!

  • @paulbrugger9610
    @paulbrugger9610 3 года назад +1

    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

  • @ritvars8956
    @ritvars8956 5 лет назад

    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?

  • @alangariasful
    @alangariasful 6 лет назад +2

    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

    • @CurtisParhamFreeSkills
      @CurtisParhamFreeSkills  6 лет назад

      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

  • @amrragab6474
    @amrragab6474 5 лет назад +1

    Awesome thanks alot

  • @medilies
    @medilies 4 года назад

    I like the elegent way of getting the URL :D
    but doesn't it needs validation or sanitization ?

  • @moemengaballa
    @moemengaballa 3 года назад +1

    Awesome thanks alot

  • @amrragab6474
    @amrragab6474 5 лет назад

    What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['REQUEST_URI'] ??

  • @dannyfritzgerald5712
    @dannyfritzgerald5712 5 лет назад

    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!

  • @atharaahmed6572
    @atharaahmed6572 5 лет назад

    • @srijay_guitarist
      @srijay_guitarist 5 лет назад

      There should be no quotes on magic constant '__FILE__' , just __FILE__ and its two underscores not one, on either side.
      define(ROOT, dirname(__FILE__));

  • @chhormratana833
    @chhormratana833 4 года назад

    Hi how could i configure nginx like configure .htaccess with apache?

  • @laladawood8463
    @laladawood8463 5 лет назад

    • @vuyanimatumbu5774
      @vuyanimatumbu5774 5 лет назад

      change your code to - define('ROOT',dirname(dirname(__FILE__)));

  • @anarzone
    @anarzone 6 лет назад

    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?

    • @anarzone
      @anarzone 6 лет назад

      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
      @shrikanttiwari907 6 лет назад

      MrCikkilti I am getting same problem, could you please tell me how to resolve it.

    • @fortunefintechit4488
      @fortunefintechit4488 5 лет назад

      @@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"

  • @ronnybesaw3125
    @ronnybesaw3125 5 лет назад

    This is good, for people who know what the fuck is actually going on. You're moving to fast for me.

  • @elgobert
    @elgobert Год назад

    Only geniuses turn '/' into 'DS'. 🤣🤣🤣

    • @CurtisParhamFreeSkills
      @CurtisParhamFreeSkills  Год назад

      lol...yeah. Probably not necessary unless someone is doing this on an older windows machine or server where the directory seperator is '\' instead of '/'