Time of Update: 2016-07-25
error_reporting(E_ALL);require 'Mail.php';require 'Mail/mime.php';$text = "Text version of email\nMessage made with PHP";$html = 'HTML version of email';$html .= 'Message made with ';$crlf = "\n";$from = 'from_address@163.com';$to = 'to_address@qq.
Time of Update: 2016-07-25
PHP:數組 給文章加關鍵字串連,像163文章內容自動加連結效果 $keys =array( array('網頁特效','/js_a/js.html'), array('seo','/seo/seo.html'), array('php','/phper/php.html'), array('jsp','/jsp/jsp.html'),
Time of Update: 2016-07-25
//年$year = date("Y");$beninTime = mktime(0,0,0,1,1,$year);$endTime = mktime(0,0,0,1,1,$year+1)-1;$weekArray = array();$isBegin = true;$forTime = 0;for ($time=$beninTime;$time$forTime++;$start = $end =
Time of Update: 2016-07-25
/** * Goofy 2011-11-29 * 影像處理:根據傳遞過來的座標參數,x,y,w,h,依次為選取的x座標,y座標,w寬度,h高度 * 通過imagecopy()方法將該地區copy至第一步建立的空白映像中 * 注意,在建立映像的時候要用imagecreatetruecolor()真彩色,不然用imagecreate()圖片會失真 */
Time of Update: 2016-07-25
分享21個常用的PHP函數程式碼片段 1. PHP可閱讀隨機字串此代碼將建立一個可閱讀的字串,使其更接近詞典中的單詞,實用且具有密碼驗證功能。/***************@length – length of random string (must be a multiple of 2)**************/function
Time of Update: 2016-07-25
php將資料匯出為execl檔案格式 ?session_start(); $sql_excel=""; if(isset($_SESSION["excel"])) { $sql_excel=$_SESSION["excel"]; }
Time of Update: 2016-07-25
多內容實現分頁php $aa =
Time of Update: 2016-07-25
將csdn純文字密碼大量匯入進mysql資料庫 set_time_limit(13600); //設定時間$conn=mysql_connect('localhost','root',''); //串連資料庫mysql_select_db('csdn',$conn);mysql_query("SET NAMES utf8");$file=file('csdn.txt')
Time of Update: 2016-07-25
我想知道21712341byte在K位上是多少,M位上、G位呢?這相當於進位轉換的問題。只不過現在要轉換的進位是1024.
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實現簡單的日曆類 class calendar{private $year;private $month;private $day_week;function __construct(){$this->year=isset($_GET['year']) ? $_GET['year'] :
Time of Update: 2016-07-25
Ajax的小封裝對ajax的get請求的小封裝 function Ajax() {var xhr =null; if(window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else { xhr = new
Time of Update: 2016-07-25
有的時候html檔案的編碼方式與meta資訊中指定的編碼方式不同,可以通過這段代碼搞一下。 此程式依賴jsoup和commons-io包 import java.io.File;import java.io.FileWriter;import java.io.IOException;import java.io.Writer;import
Time of Update: 2016-07-25
開始喜愛mybatis基於介面的方式了。 其實有兩部分改動(基於官網demo做的修改): 增加分頁外掛程式,簡單易用(自我感覺良好)。 增加一個BaseMapper,把常用的方法抽象到此介面中,避免在多個介面中重複定義(相當於常見的dao基類)。 基於maven並使用記憶體資料庫hsqldb,可直接運行junit測試。 public
Time of Update: 2016-07-25
package com.qimenguigu.l07131;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;/** * 輸入年,月,日,next|prior,如果是一個正確的日期,算出上一天或下一天 * * @author Longjie * @website www.qimenguigu.com */public class Title15 {public
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
php超級全域變數數組(Super Global Array),又稱為php預定義數組,是由php引擎內建的,不需要開發人員重新定義。介紹:php超級全域變數數組(Super Global Array),又稱為php預定義數組,是由php引擎內建的,不需要開發人員重新定義。在php指令碼運行時,PHP會自動將一些資料放在超級全域數組中。php超級全域變數$_GET[] 獲得以GET方法提交的變數數組$_POST[] 獲得以POST方法提交的變數數組$_COOKIE[]
Time of Update: 2016-07-25
從網上找的,讀取檔案,改變索引值對的方法。 package com.sdut.edu.tools;import
Time of Update: 2016-07-25
在一個練習小項目中學習到的 package com.sdut.edu.tools;import
Time of Update: 2016-07-25
//方法一:function extend_1($file_name){$retval="";$pt=strrpos($file_name, ".");if ($pt) $retval=substr($file_name, $pt+1, strlen($file_name) - $pt);return ($retval);}//方法二function extend_2($file_name){$extend = pathinfo($file_name);$extend = strtolower(