随笔分类 - php
摘要:为了保证我们用 PHP 写的 API 的安全性要禁止除了接口外的访问方式.
阅读全文
摘要:if(""==$_SERVER['HTTP_REFERER']){ echo '{"status":"非法请求!"}'; exit(); }
阅读全文
摘要:'.'2.姓名:'.$name.''.'3.年龄:'.$nl.''.'4.电话:'.$tel);?>
阅读全文
摘要:由于http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js 新浪接口目前用不了 ,下面用淘宝提供的接口
阅读全文
摘要:0) exit(''); //判断是否手机 if(!isMobile()) exit(''); $cip=get_client_ip(); $filename = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=json&ip=".$cip; $json = json_decode(file_get_contents($fil...
阅读全文
摘要:/* header 跳转:更改页面头部信息,地址跳转,尽量用绝对地址, js跳转:在php中输出js的跳转语句 */ //1,后台的php跳转 header('location:'.BASE_URL.'index.php?m=news&c=index&admin=1'); //更改网页头部信息,地址跳转,绝对地址:把路径写全 //header('loaation:index.php'); //...
阅读全文
摘要:<? if(!empty($_POST)){ $username = $_POST['username'];//获取参数 $password = $_POST['password']; echo $password; exit;//程序终止 //die;程序退出 } /* empty();判断一个值是否为空(未声明,null,0,false,array(...
阅读全文
摘要:<?php /*判断当天是星期几*/ $weekarray=array("日","一","二","三","四","五","六"); //先定义一个数组 $yi="星期一"; $er="星期二"; $san="星期三"; $si="星期四"; $wu="星期五"; $liu="星期六"; $ri="星期日"; $j
阅读全文
摘要:server { listen 80; server_name www.sjk.com www.sjk.com; root "D:/www/phpMyAdmin"; location / { index index.html index.htm index.php; ...
阅读全文
摘要:[PHP] ; PHP还是一个不断发展的工具,其功能还在不断地删减 ; 而php.ini的设置更改可以反映出相当的变化, ; 在使用新的PHP版本前,研究一下php.ini会有好处的 ;;;;;;;;;;;;;;;;;;; ; 关于这个文件 ; ;;;;;;;;;;;;;;;;;;; ; 这个文件控
阅读全文
摘要:$keyword,'from'=>$from); } //以下为测试 //在搜索引擎搜索个关键词,进入网站 $word = search_word_from(); if(!empty($word['keyword'])){ echo '关键字:'.$word['keyword'].' 来自:'.$word['from']; } ?>
阅读全文
摘要:php中的require() 语句的使用方法require()语句包括并运行指定文件。require()语句包括并运行指定文件。有关包括如何工作的详细信息见 include() 的文档。require() 和 include()除了怎样处理失败之外在各方面都完全一样。require 会生成致命错误(
阅读全文

浙公网安备 33010602011771号