上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页

2017年7月6日

php菜刀分析学习

摘要: 这里以eval为例 我们知道, php中的eval能把字符串当代码执行: 注意, 这里的代码要有分号结尾, 我们测试: 我们创建一个最简单的SHELL: 在post数据位置发送: 可以看到phpinfo()并没有执行。 原来原因是要加 ; 号结速一个语句, 像php语法一样, 语句后面要加 ; 号。 阅读全文

posted @ 2017-07-06 01:51 Perl6 阅读(2896) 评论(0) 推荐(1) 编辑

2017年7月5日

PHP对象3: public / private / protected

摘要: '; } public function wsay(){ $this->say(); } } class B extends A { public function Bsay($input){ $this->name = $input; echo 'Say name\'s:'.$this->name.''; ... 阅读全文

posted @ 2017-07-05 22:23 Perl6 阅读(233) 评论(0) 推荐(0) 编辑

PHP对象2: 构造函数与析构函数

摘要: 当一个对象的所有引用都没有时, 一个对象才消失, 这时才执行析构函数 阅读全文

posted @ 2017-07-05 06:18 Perl6 阅读(224) 评论(0) 推荐(0) 编辑

PHP对象1: 创建对象与 $this

摘要: '; $this->name = "传入的值是:{$name}"; echo $this->name.''; } } $one = new perl('a'); #创建对象时返回对像的引用 #$one->name = 'perl6'; #对像之前的赋值, 是址址传递 #比如: $two = $one; #这样的话, 这两个对像是一样的, 内存地址一样,... 阅读全文

posted @ 2017-07-05 03:33 Perl6 阅读(444) 评论(0) 推荐(0) 编辑

PHP提取url

摘要: <?php $str = parse_url('http://localhost/?id=2&cd=2', PHP_URL_QUERY); ECHO $str; parse_str($str, $cc); print_r($cc); 阅读全文

posted @ 2017-07-05 01:45 Perl6 阅读(280) 评论(0) 推荐(0) 编辑

PHP中的 get_magic_quotes_runtime

摘要: get_magic_quotes_runtime() 获得外部文件及数据库资料时是否进行转义 set_magic_quotes_runtime(1); 临时设置获得外部文件及数据库资料时是否进行转义 比如读取数据库资料或从外部读取文件时, 会进行转义(如果开启) eg: select username from admin; result: admin\'... 阅读全文

posted @ 2017-07-05 00:48 Perl6 阅读(322) 评论(0) 推荐(0) 编辑

php中的转义函数

摘要: <?php parse_url 解析URL, 返回各组成部分 urlencode/urldecode url编码/解码 htmlentities 将字符串转化为html实体 htmlentities($str, $key) $key: ENT_COMPAT 只转换双引号, 默认 ENT_QUOTES 转换单双引号 ENT_NOQU... 阅读全文

posted @ 2017-07-05 00:31 Perl6 阅读(345) 评论(0) 推荐(0) 编辑

2017年7月4日

Mysql储存过程8:repeat循环

摘要: 语法: 就是相当于其他语言中的: 阅读全文

posted @ 2017-07-04 08:23 Perl6 阅读(1381) 评论(0) 推荐(0) 编辑

Mysql储存过程7: case

摘要: 注意这个case用在储存过程中与用在查询语句中是不一样的。 储存过程中要用end case结束, 用在一般查询中是end结束。 用法可参以参考一下这里: http://www.cnblogs.com/perl6/p/6995593.html 阅读全文

posted @ 2017-07-04 08:02 Perl6 阅读(242) 评论(0) 推荐(0) 编辑

Mysql储存过程6: in / out / inout

摘要: in 为向函数传送进去的值 out 为函数向外返回的值 intout 传送进去的值, 并且还返回这个值 调用时: call q1(1, @value); 注意, 第二个参数要为变量定义的型式。 这个函数并没有向外发送改变后的name值, 所以调用后 select @value 为null。 再看看o 阅读全文

posted @ 2017-07-04 07:43 Perl6 阅读(213) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页

导航