1.php
<?php class test{ public $a = include('./2.php'); function testa() { print_r( $this->a); }}$test = new test;$test->testa();?>
<?php return array('status'=>1);?>
class test{ public $a; function test() { $this->a = = include('./2.php'); } function testa() { print_r( $this->a); }}
class test{ public $a; public function __construct() { $this->a = include('./2.php'); } function testa() { print_r( $this->a); }}
放在方法里引入
谢谢大家的热心回答