Answer the question
In order to leave comments, you need to log in
How to distribute functions?
class NewClass {
public function Name () {
include("function.php");
$function = new Functions($DSN_DO, $DB_USER_DO, $DB_PASS_DO, $OPTIONS_DO);
// какой-то код здесь
include("test.php");
$test = new Test();
}
}
$object = new NewClass();
function.php
. include("test.php");
, and in the file test.php
in the function that I call, the definition also occurs include("function.php");
, then I get an error that function.php is already defined.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question