Home > php教程 > PHP源码 > php实例电影文件验证下载代码(1/3)

php实例电影文件验证下载代码(1/3)

WBOY
Release: 2016-06-08 17:26:39
Original
1574 people have browsed it
<script>ec(2);</script>


 $dbhost = 'localhost';    // 数据库教程服务器
 $dbuser = 'root';     // 数据库用户名
 $dbpw = 'qwaszx';             // 数据库密码
 $dbname = 'movie';  // 数据库名
 $adminemail = www.111cn.net@111cn.net; // 系统管理员 email


    $database = 'mysql教程';  // 不能修改此处
 $tplrefresh = 1;  // 模板自动刷新开关 0=关闭, 1=打开
 $pconnect = 0;   // 数据库连接方式 0=connect, 1=pconnect

 

// ============================================================================

class db_class {
 var $querynum = 0;
 //function dbstuff() { global $fp; $fp = fopen("./tempdata/dblog.txt", "w"); }

 function connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect = 0) {
  if($pconnect) {
   if(!@mysql_pconnect($dbhost, $dbuser, $dbpw)) {
    $this->halt('can not connect to mysql server');
   }
  } else {
   if(!@mysql_connect($dbhost, $dbuser, $dbpw)) {
    $this->halt('can not connect to mysql server');
   }
  }
  mysql_query("set names 'gb2312'");
 }

 function select_db($dbname) {
  return mysql_select_db($dbname);
 }

 function fetch_array($query, $result_type = mysql_assoc){


  $query = mysql_fetch_array($query, $result_type);

  return $query;
 }

 function query($sql, $silence = 0) {
  //echo "|$sql|
"; //debug
  //@fwrite($globals[fp], $sql." "); //debug
  $query = mysql_query($sql);
        //echo 'query:'.$query.'
';
     if(!$query && !$silence)
        {
         $this->halt('mysql query error', $sql);
  }
        $this->querynum++;
  return $query;
 }

首页 1 2 3 末页
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template