php - Call method in external class -
how reference method inside external php file?
external-file.php
class ourexternalclient { public function getsomedata($variable) { $somecode = new code(); $somecode->variable = $variable; [...] } }
current-file.php
include_once("external-file.php"); $morecode = ourexternalclient::getsomedata($variable);
...i figure how access external method, i'm not sure. when that, afterwards breaks. example quite vague, i'm hoping can point in right direction.
how creating instance of class?
include_once("external-file.php"); $ourexternalclient = new ourexternalclient(); $morecode = $ourexternalclient->getsomedata($variable);
Comments
Post a Comment