Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Try out my first PHP web app! Reply To: Try out my first PHP web app!

#182180
chrisburton
Participant

Awesome clarification, @traq. This actually helps me with the comment system I’m building (slowly but surely).

The following is what I don’t understand

class Config {
    public static function get($path = null) {
    // Path is set to null

        if($path) {
        // Meaning, if $path is set to null?

            $config = $GLOBALS['config'];
            // Redefines the GLOBAL config to $config

            $path = explode('/', $path);
            // $path is redefined to what now? I thought it was null?

        ...

        }
    }
}

https://www.youtube.com/watch?v=S6vDgLwJ7n8

Edit: Duh. I should have rewatched the video. The answer starts at 3mins.