`
天梯梦
  • 浏览: 13637626 次
  • 性别: Icon_minigender_2
  • 来自: 洛杉矶
社区版块
存档分类
最新评论
文章列表
Sometimes we need to display general messages or error messages to the user noticing about certain action, for example on success or failure. Imagine you are submitting a form and then creating or updating the data in the database. You may be interested in noticing the user about the result fo ...
(1)echo,print,print_r,printf,sprintf 前两个函数是输出字符串.字符串中如果有变量名则被替换成其值.  print_r也是输出函数,不同的是他可以输入复杂结构的数据,比如数组,对象 后两个函数类似于C的同名函数.   (2)strchr,strlen,strtok,strrchr,strrev,strstr,strtolower,strtoupper,substr,ucfirst 这些是常用的字符串操作函数,有些和C中的同名函数意义完全一致. m strrev是把一个字符串翻转. strtolower和strtoupper顾名思 ...
1. 英文版 http://sharethis.com/publishers/get-sharing-button <!-- AddThis Button BEGIN --> <div><a expr:addthis:title='data:post.title' expr:addthis:url='data:post.url' class='addthis_button'><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width=& ...
If you are using CodeIgniter, as well as any other PHP framework, you may notice that building CRUD forms is one of the most bother and routine tasks. Probably 80% of general web applications uses CRUD (create/read/update/delete). In CodeIgniter, you can use any of the form generation librari ...
1:Global的作用是定义全局变量,但是这个全局变量不是应用于整个网站,而是应用于当前页面,包括include或require的所有文件   $a=123; function aa(){ Global $a; //如果不把$a定义为global变量,函数体内是不能访问$a的 echo $a; } aa();   总结:在函数体内定义的global变量,函数体外可以使用,在函数体外定义的global变量不能在函数体内使用,   $glpbal $a; $a=123; function f(){ echo $a; ...
层内容被FLASH遮挡解决办法 今天在调整公司网站是发现,在视频播放的页面,分享按钮弹出推荐层会被flash播放器遮挡,给层加上z-index也不起作用,如是去google了一下,找到一些方法:wmode属性: “Window ” 在 Web 页上用影 ...
codeIgniter默认的配置下是不允许URL中包含非ASCII字符的,如果我们有这样一个字符串: http://www.example.com/photo/ 北京/鸟巢.jpg 那么CI会毫不客气的告诉你: The URI you submitted has disallowed characters. 你 可能会说,那我把这个URL使用 ...
用replace 方法 语法 stringObj.replace(rgExp, replaceText) replace 方法的语法包括下述部分: 部分 描述 stringObj 必选项。要执行该替换的 String 对象或文字。该对象不会被 replace 方法修改。 rgExp 必选项。描述要查找的内容的一个正则表达式对象。 replaceText 必选项。是一个String 对象或文字,对于stringObj 中每个匹配 rgExp 中的位置都用该对象所包含的文字加以替换。 下面的示例演示了 replace 方法的用法: function ReplaceDemo( ...
Apache的Mod_rewrite学习 (RewriteCond重写规则的条件)收藏 RewriteCond Syntax: RewriteCond TestString CondPattern [flags]   RewriteCond指令定义一条规则条件。在一条RewriteRule指令前面可能会有一条或多条RewriteCond指令,只有当自身的模 板(pattern)匹 ...
RewriteCond 重写规则执行条件 语法: RewriteCond TestString CondPattern 生效域: server config, virtual host, directory, .htaccess 特别的上面的 TestString, 可提供反向引用. 引用模式为: %N 其中N为(0 <= N <=9), 引用当前若干RewriteCond条件中最 ...
http标准协议中有专门的字段记录referer 一来可以追溯上一个入站地址是什么 二来对于资源文件,可以跟踪到包含显示他的网页地址是什么。 因此所有防盗链方法都是基于这个Referer字段 网上比较多的2种 一种是使用apache 文件FileMatch限制,在httpd.conf中增加 ( 其实也可以将把下面的语句存成一个.htaccess文件),并放到你的网站 的根目录(就是www/html目录),这样子别人就没有办法盗连你的东东了~~   SetEnvIfNoCase Referer "^http://yahoo.com/" local_re ...
本文将向大家介绍几个在web应用程序上比较实用的htaccess 技巧。 准备工作 Htaccess 文件是Apache HTTP web服务器的纯文本配置文件。无需访问httpd.conf 文件,用户就可以设置目录选项。因此,要求你的服务器使用Apache,并且主机 ...
去掉 URL 中的 index.php 首先,你要清楚自己的 Web 服务器是 Apache,支持 mod_rewrite,并且已经配置好 rewrite 相关的参数。 什么是 rewrtie 可以 Google 一下。 然后,在 CI 根目录(与index.php同级) 下新建立一个配置文件,命名为: .htaccess 在里面这样写: RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /inde ...
<?php header('Content-type: application/image/pjpeg');//输出的类型 header('Content-Disposition: attachment; filename="downloaded.jpg"'); //下载显示的名字,注意格式 readfile('my.jpg'); // 并将这个文件以前面header发送信息设定的类型输出,从而会弹出一个下载框 // 就是把服务器上的my.jpg下载下来,下载显示和保存的名字默认是downloaded.jpg ?> 附带文档类型及服务器响应类别 ...
规则 1:绝不要信任外部数据或输入 关于 Web 应用程序安全性,必须认识到的第一件事是不应该信任外部数据。外部数据(outside data) 包括不是由程序员在 PHP 代码中直接输入的任何数据。在采取措施确保安全之前,来自任 ...
Global site tag (gtag.js) - Google Analytics