how insert method in class from another file? Now i get error:
C `T_FUNCTION ': \ wamp \ www \ hattında 9 index.php
index.php file:
<?php
class cars
{
public function go()
{
echo 'go go';
}
include('stop.php');
}
$c = new cars;
$c->go();
?>
stop.php file
<?php
public function stop()
{
echo 'stop method';
}
?>