How to load return array from a PHP file?

前端 未结 3 2082
小鲜肉
小鲜肉 2020-12-07 21:54

I have a PHP file a configuration file coming from a Yii message translation file which contains this:

 \'value\'
  \'         


        
3条回答
  •  时光说笑
    2020-12-07 22:15

    Returning values from an include file

    We use this in our CMS. You are close, you just need to return the value from that function.

    function fetchArray($in)
    {
      if(is_file($in)) 
           return include $in;
      return false
    }
    

    See example 5# here

提交回复
热议问题