zoukankan      html  css  js  c++  java
  • 编译php-5.3.28

    1. 下载php-5.3.28

    2. 编译/安装

      ./configure --prefix=/usr/local/php --enable-fpm --enable-maintainer-zts --with-curl

    <!DOCTYPE html>
    <html lang="en">
    <head>
    	<meta charset="UTF-8">
    	<title>结果数据</title>
    </head>
    <body>
    	
    
    
    <?php
    $path = $_POST['path'];
    $langs = $_POST['langs'];
    $key = $_POST['lang-key'];
    
    /**
    * load lang files
    */
      class lang_thread_run extends Thread   
      {  
          public $lang;  
          public $path;  
          public $key;  
          public $data;  
      
          public function __construct($lang, $path, $key)  
          {  
              $this->lang = $lang;  
              $this->path = $path;  
              $this->key = $key;  
          }  
      
          public function run()  
          {  
              if(($path = $this->path))  
              {  
              	require_once($path);
                  $this->data = constant($this->key);  
              }  
          }  
      } 
    
    function zen_href_link($value='')
    {
    	return "";
    }
    
    if (!ini_get('display_errors')) {
        ini_set('display_errors', '1');
    }
    if (!empty($langs) && !empty($key))  {
    	if (empty($path))  {
    		$file_path = '$.php';
    	} else {
    		$file_path = '$/'.$path;
    	}
    
    	$langs = explode(',', $langs);
    	$res = array();
    	$thread_array = array();
    
    	// get  lang by key
    	foreach ($langs as  $value) {
    		$thread_array[$value] = new lang_thread_run($value, str_replace('$', $value, $file_path), $key);
    		$thread_array[$value]->start();
    	}
    
    	foreach ($thread_array as $thread_array_key => $thread_array_value)   
    	      {  
    	          while($thread_array[$thread_array_key]->isRunning())  
    	          {  
    	              usleep(10);  
    	          }  
    	          if($thread_array[$thread_array_key]->join())  
    	          {  
    	              $data_res[$thread_array_key] = $thread_array[$thread_array_key]->data;  
    	          }  
    	      }
    
          	foreach ($langs as  $value) {
          		$res[$value] = $data_res[$value];
          	}
    
          	echo implode(',', $res);
    }
    
    ?>
    </body>
    </html>
    

      

  • 相关阅读:
    每天拿出来2小时浪费(文/王路) 作者: 王路
    objective-c自学总结(二)---init/set/get方法
    objective-c自学总结(一)---面向对象
    水仙花数
    独木舟上的旅行
    阶乘之和
    小明的调查统计
    管闲事的小明
    重温《STL源码剖析》笔记 第一章
    重温《STL源码剖析》笔记 第三章
  • 原文地址:https://www.cnblogs.com/javawer/p/4798004.html
Copyright © 2011-2022 走看看