$name= path1
$key= key1
public static function getpath($name, $key)
{
if (!self::is_valid($name, $key)) return false;
$path = '/var/lib/fdata/'.$name.'/'.$key;
if (!is_file($path)) return false;
return $path;
}
public static function get($name, $key)
{
$path = self::getpath($name, $key);
if ($path === false) return false;
return file_get_contents($path);
}
$configmap = unserialize(fdata::get('base', 'key'));
问题是:
- 如果变量
$path = self::getpath($name, $key);
那么 $path = ? 什么意思self::
- 如果变量
$configmap = unserialize(fdata::get('base', 'key'));
那么 $configmap = ? 什么意思fdata::