Juszeil Conception

Juszeil Conception

  • D
  • ï
  • s T
  • a

«2017 - 3»
@GT|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
TODAY

Hide Banner | LOGIN
2021-1-23 |

BLOG

Total found 11 articles of catalog 程 式 語 言 on 2017-3.

程 式 語 言 2017-3-25 19:02:39

PHP - header:下載與轉址等等

header函數的加bbcode_right]用header — Send a raw HTTP header透過header函數我們可以修改 HTTP Header而要讓瀏覽器啟動下載必要的一行函數header('Content-type:application/force-download');只要有這行,就可以把瀏覽器上........



Read Full Article

程 式 語 言 2017-3-25 18:54:23

PHP - Resize and crop image from center


//resize and crop image by centerfunction resize_crop_image($max_width, $max_height, $source_file, $dst_dir, $quality = 80){    $imgsize = getimagesize($source_f........



Read Full Article

程 式 語 言 2017-3-25 18:32:21

PHP String Chopping Excerpt

$string = 'Lor em ipsum dolor sit #hastag amet, consectetur adipiscing elit. Sed metus augue, mollis non ornare eget, consectetur non eros. In hac habitasse platea dictumst. Duis egestas ultricies iac........



Read Full Article

程 式 語 言 2017-3-25 18:17:09

使用PHP导入和导出CSV文件


我們先准備mysql數據表,假設項目中有一張記錄學生信息的表student,並有id,name,sex,age分別記錄學生的姓名、性別、年齡等信息。CREATE TABLE `student` (   `id` int(11) NOT NULL auto_increment,   `name` varchar(50) NOT NU........



Read Full Article

程 式 語 言 2017-3-15 2:03:49

PHP - SQL Injection

mysql_real_escape_string($val);........



Read Full Article

程 式 語 言 2017-3-15 0:38:18

PHP - 刪除字串頭尾的(一個或多個)特定字元 (利用 trim )

我們常會利用 trim() 去刪除字串頭尾的空白符號,事實上,除了空白符號外,trim 也可以讓我們刪除指定的字元,例如: $mystr = "1,2,3,,,,,";$mystr = trim($mystr, ",");echo $mystr;  //印出 1,2,3 ........



Read Full Article

程 式 語 言 2017-3-14 20:22:25

PHP - 如何讓 PHP 的產生的陣列(array) 轉成 JavaScript 可以使用的物件(Object)格式 (透過 json_encode() 轉換

 $arr = array(1,2,3); $obj = json_encode($arr, JSON_FORCE_OBJECT); ?> var obj = new Object(); obj = ; ........



Read Full Article

程 式 語 言 2017-3-14 20:17:14

PHP - 如何找出兩個日期間差了多少"月份"

例如我們想知道 2014-12-28 與 2015-01-01 間差了幾個月份 $sd = $_POST['search_startdate'];$ed = $_POST['search_enddate'];$diff_month = (date('Y', strtotime($ed)) - date('Y', strtotime($sd))) * 12 + (date('m'........



Read Full Article

程 式 語 言 2017-3-14 20:10:19

PHP - 如何產生跨年度的月份表

$dateStart = new \DateTime();  //開始日期 $dateInterval = \DateInterval::createFromDateString('+1 month');  /[bbcode_lef........



Read Full Article

程 式 語 言 2017-3-14 20:08:34

PHP - 網址參數的抓法 (使用 http_build_query)

假設網址是 http://www.myweb.com/index.php?a=1&b=2&c=3 我們知道要抓參數的方式為 $_GET['a']、 $_GET['b']...,如果需要串成query string,有個很簡單的方式,如下: $url_querystring ........



Read Full Article

程 式 語 言 2017-3-14 20:07:44

PHP - 檢查 Email 與 IP 的格式是否合法

檢查 Email 的有效性,第一步就是檢視其格式是否合法,PHP 內建的 fliter_var() 可以讓我們不需編寫複雜的正規式,就可以無腦的檢查出使用者提供的 Email 是否有符合規定格式,使用方式如下:$email = '123.aaa.bbb';//檢查 emaili........



Read Full Article


Back To Top

Find Me

Powered By 2013-2015 ©. Juszeil Conception version 2.0
Queries Executed : 0.0087 seconds