Time of Update: 2017-01-13
php簡單 線上投票系統 源碼下載,上次要和你一家公合作他們說要我寫一個簡單的投票系統,但是每一個IP只能投一次,好了下面就是我寫的一個最最簡單的投票系統了,是用php實現的.先來建立資料庫.有兩個一個記錄投票次數與相關資訊一個是記錄IP.CREATE TABLE IF NOT EXISTS `lj_vote` ( `id` int(8) NOT NULL auto_increment, `v_type` int(4) default '1',
Time of Update: 2017-01-13
php 廣告點選統計代碼,昨天晚上有幾個IDC網想與本站合作放些廣告,但是我想看看廣告效果後想了就寫了一個簡單的廣告統計代碼了,這裡只是等的統計不能IP限制或是噁心點擊等等了.先來建立資料庫.CREATE TABLE IF NOT EXISTS `ad_count` ( `ad_id` int(8) NOT NULL auto_increment, `ad_hit` int(8) NOT NULL default '0', `ad_name` varchar(
Time of Update: 2017-01-13
php 類的寫法//Db.class.phpclass Db { private $_dblink; public $result; public function __construct($host, $user, $password, $dbname, $charset = 'utf8') { try{
Time of Update: 2017-01-13
模板 template.html : 複製PHP內容到剪貼簿 PHP代碼:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html
Time of Update: 2017-01-13
<?php$hostname = 'localhost';$dbname = 'test';$username = 'root';$pw = 'vivian';$sqlfile = 'gb.sql';$sql = file_get_contents($sqlfile);echo($dbname);echo($sql);$conn = mysql_connect($hostname,$username,$pw) or
Time of Update: 2017-01-13
$sql="select * from my_note where note_url='4'"; $result=mysql_query($sql) or
Time of Update: 2017-01-13
function dftp_connect($ftphost, $ftpuser, $ftppass, $ftppath, $ftpport = 21, $ftpssl = 0, $silent = 0) { global $ftp; @set_time_limit(0); $ftphost = wipespecial($ftphost); $ftpport = intval($ftpport); $ftpssl =
Time of Update: 2017-01-13
<!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
Time of Update: 2017-01-13
<?phpheader("Content-type: text/html;charset=GBK");//輸出編碼,避免中文亂碼$page=isset($_GET['page'])?intval($_GET['page']):1; //這句就是擷取page=18中的page的值,假如不存在page,那麼頁數就是1。$num=10; &
Time of Update: 2017-01-13
php ajax使用者註冊檢測代碼index.php 複製PHP內容到剪貼簿 PHP代碼:<tr> <td width="25%" class="altbg1"> 用 戶 名<font color="red">
Time of Update: 2017-01-13
<?php include_once ("sql_connect.php"); include_once ("my_msg.php"); ?> <html> <head> <meta http- equiv="content-type" content="text/html" charset=utf-8 /> <title&
Time of Update: 2017-01-13
<?phpphp文章_分頁代碼 //為了避免重複包含檔案而造成錯誤,加了判斷函數是否存在的條件:if(!function_exists(pageft)){ /function pageft($totle,$displaypg=20,$url=''){//定義幾個全域變數: //$page:當前頁碼;//$firstcount:(資料庫)查詢的起始項;//$pagenav:頁面導航條代碼,函數內部並沒有將它輸出;//$_SERVER:讀取本頁URL“$_SERVER["
Time of Update: 2017-01-13
<?php php 留言板防重新整理效果 $ip = $_SERVER['REMOTE_ADDR']; $conn = mysql_connect($mysql_server_name, $mysql_username,
Time of Update: 2017-01-13
php儲存遠程圖片,我這個系統是自己寫了,所以上傳圖片時相當麻痹了,我還用了新雲的一個系統,他那編輯器支援遠程儲存圖片功能,但那個是asp的而我的系統只支援php我想php可能比asp更容易實現這個功能吧,開始想到用file_get_contents(),然後用fopen儲存file_get_content取得的內容就OK了,下面是我實現的一個小程式.<?php$filed="yun_qi_img/conference_php_quebec.gif";$datad=fi
Time of Update: 2017-01-13
php 資料查詢與串連類<?php/** * Class program for yinghua05-2 * designer :songsong */class MySQL { var $link; var $result; var $querys; function MySQL($host = '', $user = '', $pw = '', $db = '', $encode = 'UTF8') {&
Time of Update: 2017-01-13
php類的使用執行個體教程<?php/** * Class program for yinghua05-2 * designer :songsong */class Template { var $tpl_vars; var $tpl_path; var $_debug; /** * Construct for Template * PHP5 or upper
Time of Update: 2017-01-13
php熱門檔案上傳類<?php/** * flie class * (jpg,gif,png) */class Upload { var $_file; var $_fileType; var $target = 'upload/'; /** * construct for this class * * @param string $name *
Time of Update: 2017-01-13
php使用者密碼修改代碼<?php @session_start(); require_once("../inc/ring_admin.php"); require_once("../../inc/connect.php"); require_once("../../admin/inc/function.php"); ring_login(); $pwd =
Time of Update: 2017-01-13
php實現編碼的轉換,這裡會把gb2312轉換成utf-8function gb2utf8($gb) { if( !trim($gb) ) return $gb; $utf8=''; while($gb) { if( ord(substr($gb,0,1)) > 127 )
Time of Update: 2017-01-13
<?phpsession_start();# 取得隨機字元function getRandStr($length = 4, $mode = 1){ $str1 = '123456789'; $str2 = 'abcdefghijklmnopqrstuvwxyz'; $str3 = 'ABCDEFGHIJKLMNPQRSTUVWXYZ'; $str4 = '_'; $str5 =