![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
php
ihefe
这个作者很懒,什么都没留下…
展开
-
xmlrpc类
<br /><br /><?php/** * IXR - The Inutio XML-RPC Library * * @package IXR * @since 1.5 * * @copyright Incutio Ltd 2002-2005 * @version 1.7 (beta) 23rd May 2005 * @author Simon Willison * @link http://scripts.incutio.com/xmlrpc/ Site *翻译 2010-12-09 18:17:00 · 1648 阅读 · 0 评论 -
php判断是否有权限下载
<?phpif($_GET['id']==2){ //$file_name = "info_check.exe"; //$file_dir = "/public/www/download/"; $dir='maze.png'; if (!file_exists($dir)) { //检查文件是否存在 echo "文件找不到"; exit; } else { $file原创 2010-12-21 15:21:00 · 1742 阅读 · 0 评论 -
mac下php(fastcgi)使用
sudo port install php5 +fastcgi fcgi sudo port install php5-mysql php5-pgsql php5-iconv php5-sockets php5-memcached php5-imagick php5-mongo php5-openssl php5-mbstring 一般mac守护进程都放在 ~/Lib原创 2010-12-13 11:45:00 · 3953 阅读 · 0 评论 -
curl 抓取google简体中文
<br /><?phpheader("Content-Type: text/html;charset=utf-8");$content="中国人民银行";$url = "http://www.google.com.hk/search?hl=zh-CN&source=hp&q={$content}&btnG=Google+%E6%90%9C%E7%B4%A2&meta=lr%3Dlang_zh-CN&aq=f&aqi=&aql=&oq=&gs_rfai=";$cookie_file = "go翻译 2011-03-22 13:42:00 · 2403 阅读 · 1 评论 -
分隔连续数字
$data = array(0,1,2,3,6,7,8,9,10,12,14,16,17,18,19,20,23,28,29,30,35,36,37);//print_r($data);$y=0;foreach($data as $key=>$value){$i=($key-1==-1)?0:$data[$key-1];if($i==($value-1)){//echo $j.$y."";$str[$y][]=$value;}else{$y++;$str[$y][]=$value;}}print_r($st原创 2011-01-24 15:33:00 · 627 阅读 · 0 评论 -
Diffie-Hellman密钥交换
<br /> //header('Content-Type:text/html;charset=utf-8'); //include Diffie Hellman functions require_once 'Crypt/DiffieHellman.php'; //set the required options for two subjects $subject_1 = array('prime'=>'1234567', 'generator'=>'7',翻译 2011-01-11 10:18:00 · 1769 阅读 · 0 评论 -
CodeIgniter,smarty的使用
lang->load('error', 'cn'); echo $this->lang->line('language_key'); } function index() {// $this->output->cache(1); $this->load->library('cismarty'); $dir=array( 'template_dir' => ROOT . '/template/', 'compile_dir' => ROOT . '/templa原创 2011-01-05 10:46:00 · 1188 阅读 · 0 评论 -
CodeIgniter整合smarty
CodeIgniter整合smarty,实现view与代码分离(根目录平级)iapp/libraries/CISmarty.php原创 2011-01-05 10:37:00 · 1759 阅读 · 0 评论 -
mac.Eclipse编码utf-8和php语法高亮。
编码:编好设置-》General-》Content Types-》右侧(Text)点开-》设置自己用到的文件类型变量高亮:编好设置-》php-》Editor-》Syntax Coloring-》右侧(Syntax Element)-》选择Variable(变量)右边有设定原创 2010-12-25 13:48:00 · 2120 阅读 · 0 评论 -
php,httpbasic验证
<br />function authenticate() { header('WWW-Authenticate: Basic realm=""'); header('HTTP/1.0 401 Unauthorized'); echo "You must enter a valid login ID and password to access this resource/n"; exit;}if (addslashes($_SERVER['PHP_AUT原创 2010-12-20 11:39:00 · 2026 阅读 · 0 评论 -
php递归显示数据集合
$array=Array( 0 => Array("id" => 329, "parent" => -1,"name" => "web", "user_id" => 3 ), 1 => Array("id" => 330, "parent" => 329, "name" => "php","user_id" => 3), 2 => Array("id" => 336,"parent" => 329,"name" => "nginx","user_id" => 3),原创 2010-12-14 15:29:00 · 1532 阅读 · 0 评论 -
xmlrpc使用
IXR_Server(array( 'i.h' => 'this:sayHello', 'i.get' => 'this:set_get', 'i.echos' => 'this:echos', 'i.arr' => 'this:return_array' )); } function set_get($get) { $g1=$get[0]; $g2=$get[1]; $g3=$ge原创 2010-12-09 18:29:00 · 1384 阅读 · 0 评论 -
mac os x el capitan 10.11 对系统文件的读写权限问题
今日升级了os 10.11 发现不管普通管理员还是root 都不能更改系统文件的读写权限与更改组权限比如 /usr/lib/php/extensions/ 目录死活都修改不了。找了几个方法第1方法 :终端输入>sudo nvram boot-args="rootless=0">sudo reboot //重启第2方法 :终端输入>sudo nv原创 2015-10-09 19:50:42 · 11647 阅读 · 2 评论