Skip to main content
added 62 characters in body
Source Link
hek2mgl
  • 159.1k
  • 31
  • 263
  • 279

How could you fail to read about the require_once directive? :)

$config = file_get_contents($config_file_path);

Must be:

require_once $config_file_path;
// now you can use variables, classes and function from this file
var_dump($config);

If you follow the link to the require_once manual page please read also about include and include_once. As a PHP developer you MUST know about this. It's elementary

How could you fail to read about the require_once directive? :)

$config = file_get_contents($config_file_path);

Must be:

require_once $config_file_path;
// now you can use variables, classes and function from this file
var_dump($config);

If you follow the link to the require_once manual page please read also about include and include_once

How could you fail to read about the require_once directive? :)

$config = file_get_contents($config_file_path);

Must be:

require_once $config_file_path;
// now you can use variables, classes and function from this file
var_dump($config);

If you follow the link to the require_once manual page please read also about include and include_once. As a PHP developer you MUST know about this. It's elementary

Source Link
hek2mgl
  • 159.1k
  • 31
  • 263
  • 279

How could you fail to read about the require_once directive? :)

$config = file_get_contents($config_file_path);

Must be:

require_once $config_file_path;
// now you can use variables, classes and function from this file
var_dump($config);

If you follow the link to the require_once manual page please read also about include and include_once