Time of Update: 2016-07-25
小段php代碼實現DOS攻擊 $ip = $_SERVER['REMOTE_ADDR'];?>PHP DoS, Coded by EXEYour IP: (Don't DoS yourself nub)複製代碼 /
Time of Update: 2016-07-25
將字串open_door轉化為OpenDoor,將abc_bcd_cde轉化成AbcBcdCde 【html代碼】 將字串open_door轉化為OpenDoor,將abc_bcd_cde轉化成AbcBcdCde 複製代碼
Time of Update: 2016-07-25
/** * Validator for Login. */final class LoginValidator { private function __construct() { } /** * Validate the given username and password. * @param $username and $password to be validated * @return array array of
Time of Update: 2016-07-25
函數列表: convert_cyr_string() crc32() hebrev() hebrevc() money_format() number_format() echo convert_cyr_string('The string', 'k','i');複製代碼
Time of Update: 2016-07-25
1,主題所使用的檔案夾在wp-content/themes/所對應的主題檔案夾 主題裡邊有-----functions.php(主題所用的函數主要在這個裡邊),在本檔案中添加如下代碼: register_nav_menus(array('header-menu' => __( '導航自訂菜單' ),));//即註冊導覽功能表2,在所用主題檔案夾中的header.php檔案中,把原來的 ">部落格 注釋掉, 換成 'header-menu' )); ?>代碼3
Time of Update: 2016-07-25
利用 PHP 5.x 中的 DateInterval 將 DateTime 對象轉化為友好時間顯示 /** * 友好日期時間 * *
Time of Update: 2016-07-25
package com.sjzmlb.test;/** * * @author sjzmlb * */public class TestArray {public static void main(String[] args) {// -----不規則二維數組 ----int[][] ints = new int[5][];for (int i = 0; i ints[i] = new int[i + 1];for (int j = 0; j ints[i][j] = i + 1;}}for
Time of Update: 2016-07-25
客戶有各種稀奇的需求,現要求在使用平台過程中複製過的內容儲存並展示供使用人員參考 package cn.net.ssd.common.format;import java.awt.Image;import java.awt.Toolkit;import
Time of Update: 2016-07-25
/*** 目錄產生類 :UtilsMakeDir* @author yepeng* @since 2010.3.18*/class UtilsMakeDir{//基目錄 建立目錄時不會對這個目錄進行建立。這應該是個已經存在的目錄private static $makeBasePath = 'video';private static $delBasePath = 'video';/*** 遞迴建立目錄,* 建立成功返回這個全路徑,* 建立失敗返回false* @param String
Time of Update: 2016-07-25
/*只支援整數的小寫金額轉中文大寫*/class ChineseNumber{//var $basical=array(0=>"零","一","二","三","四","五","六","七","八","九");var $basical=array(0=>"零","壹","貳","三","肆","伍","陸","柒","捌","玖");//var $advanced=array(1=>"十","百","千");var $advanced=array(1=>"拾","佰","仟")
Time of Update: 2016-07-25
/** * Copyright (c) 2011 - 01 XatuDream * XatuDream All Rights Reserved. * Support:185390516.qzone.qq.com * QQ:185390516 * Author:Lau Version:1.01 * Date:2010-08-12 09:28:32 */! defined ( 'WORKSPACE' ) && exit ( "Access Denied !" );class MD5Crypt {/
Time of Update: 2016-07-25
我在看那個ecmall核心檔案ecmall.php,看到這個函數寫得比較清晰,拿出來分享下 function get_domain() { /* 協議 */ $protocol = (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) != 'off')) ? 'https://' : '
Time of Update: 2016-07-25
class MY_Controller extends CI_Controller{ public function __construct() { parent::__construct(); /*判斷是否登入,判斷當前URL是否是auth/login*/ if ( ! $this->tank_auth->is_logged_in() && ( $this->router->fetch_class() != '
Time of Update: 2016-07-25
PHP實現的LZW壓縮演算法 /** * @link http://code.google.com/p/php-lzw/* @author Jakub Vrana, http://php.vrana.cz/* @copyright 2009 Jakub Vrana* @license http://www.apache.org/licenses/LICENSE-2.0
Time of Update: 2016-07-25
之前看到有人發布的飛信介面,醉翁之意不在酒, 用來賣錢的,BS之。。。 自己抽空寫了一個,拿出來跟大家分享,寫的不好的地方大家可以提出來,共同探討學習。 要求:必須是移動使用者,其次需要互為飛信好友才行,不管怎麼玩遊戲,遊戲規則是不能違背的哈。 ============================================================= 項目說明如下: index.php => 線上發送飛信的入口頁 demo.php =
Time of Update: 2016-07-25
class Person { private $name; private $age; private $id; function __construct( $name, $age ) { $this->name = $name; $this->age = $age; } function setId( $id ) { $this->id = $id; } function _
Time of Update: 2016-07-25
//上傳檔案類型列表$uptypes=array('image/jpg','image/jpeg','image/png','image/pjpeg','image/gif','image/bmp','image/x-png');$max_file_size=2000000; //上傳檔案大小限制, 單位BYTE$destination_folder="uploadimg/"; //上傳檔案路徑$watermark=1;
Time of Update: 2016-07-25
//檔案名稱字 $filename = "ip.txt"; if (isset($_SERVER['HTTP_CLIENT_IP'])) { $clientip = $_SERVER['HTTP_CLIENT_IP']; }elseif (isset($_SERVER['HTTP_X_FORWARD_FOR'])) { $clientip = $_SERVER['HTTP_X_FORWARD_FOR']; }else { $clientip =
Time of Update: 2016-07-25
在PHP處理頁面的時候,我們對於字元集的轉換都是採用了iconv或者mb_convert等函數,但,這其實是有一個前提的。即我們事先得知道in和out是什麼樣的編碼,我們才能進行正確的轉換。 雖然大多數轉換都是在gbk和utf-8之間轉,但如果不知道轉換對象的編碼怎麼辦呢?Google出來這麼一個函數safeEncoding,可以簡單的識別UTF8和GBK的編碼。這個函數在一定程度上識別的很準確,但是在一些比較複雜的環境中就不是那麼的好用了.
Time of Update: 2016-07-25
複製檔案夾到另一個地方。 /** /*** 複製檔案夾 eg:將D:/wwwroot/下面wordpress複製到D:/wwwroot/www/explorer/0000/del/1/末尾都不需要加斜杠,複製到地址如果不加源檔案夾名,就會將wordpress下面檔案複製到D:/wwwroot/www/explorer/0000/del/1/下面* $from = 'D:/wwwroot/wordpress';* $to = 'D:/wwwroot/www/explorer/0000/del/