// CS50 Library require("../vendor/library50-php-5/CS50/CS50.php"); CS50::init(__DIR__ . "/../config.json");
How does CS50::init(directory) work?
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.Sign up to join this community
To answer the specific question from your comment "why is :: used?"
From the config section of the spec
(That :: syntax just means that init is "inside of" an "object" called CS50. An object in PHP, meanwhile, is similar in spirit to, but more featureful then, a struct in C.
The CS50 class is defined around line 70 of CS50.php. You'll find more info on php classes and objects in the php doc.