上一页 1 ··· 5 6 7 8 9 10 下一页
我在lnmp 下架了一个thinkPHP框架,非常奇怪,在环境都配置好后,我在url里输入localhost:10007/index.php/member/login,正常来说应该显示login.html,但是显示的是index.html的页面,只是样式都不对,查看源代码后发现样式路径是这样的,/index.php/index.php/member/index/Tpl/css/style.css,后来我config.php里的配置项改了如下: 'DEFAULT_MODULE'=>'Member', //设置默认的控制器名称 'DEFAULT_ACT Read More
posted @ 2013-12-14 12:27 笑月儿 Views(439) Comments(0) Diggs(0) Edit
很有用的东西,参考自http://www.zhuoda.org/lunzi/66097.html第一种第二种第三种第四种第五种 Read More
posted @ 2013-12-10 09:40 笑月儿 Views(192) Comments(0) Diggs(0) Edit
转自:http://www.jb51.net/article/22501.htmphp的header来定义一个php页面为utf编码或GBK编码php页面为utf编码header("Content-type: text/html; charset=utf-8");php页面为gbk编码header("Content-type: text/html; charset=gb2312");php页面为big5编码header("Content-type: text/html; charset=big5");通常情况以上代码放在php页面的首 Read More
posted @ 2013-10-26 00:21 笑月儿 Views(233) Comments(0) Diggs(0) Edit
用到了ob_start();";}function grabImage($url,$fileName){ if($url=="") return false; $p=strrpos($url,"."); $exp=substr($url,$p+1); if($fileName=="") $fileName=mt_rand(100000,999999).".".$ext; if($exp=="gif" || $exp=="jepg" || $exp=="pn Read More
posted @ 2013-10-25 23:18 笑月儿 Views(1736) Comments(0) Diggs(0) Edit
我在linux下编写了这样一段代码:<img src="8553.jpg" alt="PHPbookmark logo" bordor="0" align="left" valign="bottom" height="55" width="57"/>可是图片却显示不出来,后来得知是因为linux下有 权限问题,像我添加的图片我对它没有设置可读的权限,所以显示不出来,后来对图片执行 sudo chmod 777 8553.jpg(因为我不是roo Read More
posted @ 2013-04-19 23:29 笑月儿 Views(593) Comments(0) Diggs(0) Edit
摘自:http://www.cnblogs.com/xiaochaohuashengmi/archive/2011/09/10/2173092.htmlphp引用就是在变量、函数或对象等前面加上&符号,使得他们从此绑定,指向同一个地址空间,任何一方变化都会牵连到另一方。1.变量的引用<? $a="ABC"; $b =&$a; echo $a;//这里输出:ABC echo $b;//这里输出:ABC $b="EFG"; echo $a;//这里$a的值变为EFG 所以输出EFG echo $b;//这里输出EFG ?>说明:就 Read More
posted @ 2013-03-26 10:28 笑月儿 Views(170) Comments(0) Diggs(0) Edit
参考自:http://www.cnblogs.com/myjavawork/articles/1793664.htmlphp5相对php4而言在面向对象方面有很多提升,成为了具有大部分面向对象语言的特性的语言。这里主要谈一下this、self、parent之间的区别。this是指向对象的指针,self是指向类本身的指针,parent是指向父类的指针。1.关于this<?php class name { //建立了一个名为name的类 private $name; //定义属性,私有 //定义构造函数,用于初始化赋值 function __cons... Read More
posted @ 2013-03-22 17:46 笑月儿 Views(350) Comments(0) Diggs(0) Edit
原文:http://dmitry.baranovskiy.com/post/91403200Quick test for real understanding of JavaScript core beyond closures and scopes. Here five small scripts. Try to answer what will be alerted in each case without running them in the console. Then you could create a test file and easily check your answers Read More
posted @ 2013-03-15 16:18 笑月儿 Views(137) Comments(0) Diggs(0) Edit
Dennis Ritchie 过世了,他发明了C语言,一个影响深远并彻底改变世界的计算机语言。一门经历40多年的到今天还长盛不衰的语言,今天很多语言都受到C的影响,C++,Java,C#,Perl, PHP, Javascript, 等等。但是,你对C了解吗?相信你看过本站的《C语言的谜题》还有《谁说C语言很简单?》,这里,我再写一篇关于深入理解C语言的文章,一方面是缅怀Dennis,另一方面是告诉大家应该如何学好一门语言。(顺便注明一下,下面的一些例子来源于这个slides)首先,我们先来看下面这个经典的代码:12345int main(){int a = 42;printf(“%d\n”, Read More
posted @ 2011-11-16 14:03 笑月儿 Views(157) Comments(0) Diggs(0) Edit
index.php页面:<html> <head> <title>图形计算器(面向对象)</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> </head> <body> <center> <h1>图形(面积 && 周长)计算器)<h1> <a href="index.php?action=rect" Read More
posted @ 2011-10-19 08:58 笑月儿 Views(654) Comments(0) Diggs(0) Edit
上一页 1 ··· 5 6 7 8 9 10 下一页