首页 > PHP教程

php提取文章内容图片地址正则表达式

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>php教程提取文章内容图片地址正则表达式</title>
</head>

阅读全文

php 连接 mysql数据库操作类

class mysql{

  private $db_host; //数据库主机
  private $db_user; //数据库用户名
  private $db_pwd; //数据库密码
  private $db_database; //数据库名
  private $conn; //数据库连接标识;
  private $sql; //sql执行的语句
  private $result; //query的资源标识符
  private $coding; //数据库编码,gbk,utf8,gb2312
  private $show_error = true; //本地调试使用,打印错误

阅读全文

php注册页面代码(mysql+php)

 include('global.php');

 if($_post['sub']){
  $user  = $_post['username'];
  $pwd   = md5($_post['password1'].$user);
  $email = $_post['email'];
   $q = $mysql->query("insert into `hl`.`hl_member`(`id`,`username`,`password`,`email`)values (null,'$user','$pwd','$email');");
  if($q){
   setcookie('login',$user);
   $prompt_msg->p('恭喜您,亲爱的会员,您已经注册成功!','index.php','现在去首页。','http://www.phprm.com','先去论坛逛逛!');
  }else{
   $prompt_msg->p('非常抱歉,系统发生故障!');
  }
 }
?>

阅读全文

ajax+php验证用户名重复代码实例

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.phprm.com/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>ajax+php验证用户名重复代码实例</title>

阅读全文

数组转换字符串php代码

本文章是一个实例,功能是数组转换字符串php代码哦,他能把一维数组,二维数组都转换成字符串代码。  代码如下 复制代码 <?php$fruits = array ("fruits" => array("a" => "orange", "b" => "banana", "c" => "apple"),"numbers" => array(1...
阅读全文