extend/alidayu/top/ApplicationVar.php

(开头部分) 946B

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

class ApplicationVar
{
	var $save_file;
	var $application  = null;
 	var $app_data    = '';
 	var $__writed    = false;

	function __construct()
 	{
    $this->save_file = __DIR__.'/httpdns.conf' ;
 		$this->application = array();
 	}

 	public function setValue($var_name,$var_value)
  {
   		if (!is_string($var_name) || empty($var_name))
    		return false;
   
   		$this->application[$var_name] = $var_value;
  }

  public function write(){
      $this->app_data = @serialize($this->application);    
      $this->__writeToFile();
  }

 	public function getValue()
 	{
     	if (!is_file($this->save_file))
        	 $this->__writeToFile();
     	return @unserialize(@file_get_contents($this->save_file));
 	}

 	function __writeToFile()
 	{
  		$fp = @fopen($this->save_file,"w");
      if(flock($fp , LOCK_EX | LOCK_NB)){
          @fwrite($fp,$this->app_data);
          flock($fp , LOCK_UN);
      }
      @fclose($fp);
 	}
}

?>

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。