我在写了一个配置文件,里面定义了一个数组,然后在一个class类中include这个配置文件,在类的里面取不到变量值,
代码:
<?php 
$config = array ( 'AuthUrl' => 'xx.xx.xx.xx',
'ReturnType' => "xx.xx.xx.xx",
'HttpHeader' => "xx.xx.xx.xx"
);
?><?php
include_once './config.php';
var_dump($config);-------引用得到
class test{
public function indesx(){
  var_dump($config);-------引用不到
}

}我怎样才能在类里面能使用include进来的数组啊,在线等待中……