folder/
file_one.php
file_two.php
file name : file_one.php
<?php
calss file_one {
public function testView ()
{
echo "YYY" ;
}
}
?>
file name : file_two.php
<?php
require 'file_one.php' ;
$file = NEW file_one;
echo $file->testView() ;
?>
result : YYY