易截截图软件、单文件、免安装、纯绿色、仅160KB

php 替换非法字符 保存到数据库


function _processBeforeDb($str)
{
$str = str_replace ( array ('<', '>' ), array ('&lt;' , '&gt;' ), $str );
if (!get_magic_quotes_runtime()){
return addslashes($str);
}
else
{
return $str;
}
}


相关文档:

PHP中全局变量的使用

<?php
 
 
  //声明全局变量
  $num = "张三";
 
  //定义一个自定义方法
  function my_fun($temp1,$temp2 = "people"){
   //要数用方法外部声明的全局变量,必须使用关键字global先在
   //自定义方法中获得到方法外部声明的全局变量的值,才能在方 ......

PHP显示出错提示的三种方法

PHP在页面上显示出错消息并让用户看见是开发人员怎么样也不愿意面对的,但是谁都不想在一台没有配置成显示出错消息的服务器上用PHP开发代码。开发时显示PHP的错误消息对开发人员来说是个明智的选择,所谓工具是使人方便的,就是如此。
  下面来说说显示PHP错误提示消息的三个方法。
  一:php.ini配置
  php.ini配 ......

PHP配置SQL Server 2008

1、到微软官方去下载新的驱动,下载地址如下:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=ccdf728b-1ea0-48a8-a84a-5052214caad9
 
  官方文档有描述:
  Refer to the documentation that is installed with the driver for a description of the new features in this ......

windows安装apache+php+mysql的一些记录

apache安装,mysql安装,php5直接解压,均放在D:\www下。
目录结构为:
D:\www\apache2
D:\www\mysql
D:\www\php5
将php5\php.ini-dist复制为php.ini,把需要用到的组件将前面的;去掉。

extension=php_mysql.dll
extension=php_gd2.dll
在apache2的conf/httpd.conf文件中加
LoadFile D:/www/php5/php5ts.dll
......

php写的大整数的乘法

/*************十进制大整数相乘****************/
    /*********
     * $A,$B均为字符串
     */
    function multipication ($A,$B){
        $sResult = "";
       ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号