Leanpub Header

Skip to main content

PHP 初學者實務手冊

Minimum price

$7.99

$7.99

You pay

$7.99

Author earns

$6.39
$

...Or Buy With Credits!

You can get credits with a paid monthly or annual Reader Membership, or you can buy them here.
PDF
EPUB
WEB
About

About

About the Book

誰適合這一本書:

  • 想學習網頁程式設計,又沒有太多程式設計經驗的初學者
  • 第一次接觸 PHP
  • 非資訊本科系,想學好 PHP 程式設計

Share this book

Author

About the Author

Jollen Chen

Jollen Chen,Moko365(仕橙3G教室) CEO 與講師,Mokoversity Founder 暨軟體工程師,熱愛研究 Linux 與 Android 技術。2005 年開始,參與、也負責過 Android 手機的產品開發計畫。曾為 Motorola、HTC、Foxconn、LG、OPPO、騰迅、廣達電腦、緯創、仁寶等超過 50 家企業講授課程。負責 Mokoversity 的全端軟體開發,也在幾家科技廠兼任 Linux 驅動程式與 Android Framework 架構設計顧問。目前正默默打造一些 Startup 計畫。

Contents

Table of Contents

  • 1 PHP 基礎教材
    • 1.1 踏出 PHP 的第一步
    • 1.2 如何開始撰寫 PHP 程式
    • 1.3 撰寫程式時的注意事項
    • 1.4 PHP 程式的副檔名
    • 1.5 PHP 敘述的結束
    • 1.6 PHP 與 HTML 的換行方式
    • 1.7 資料型態與變數
    • 1.8 型別轉換
    • 1.9 字串型態轉數值型態
    • 1.10 初始化變數
    • 1.11 初始化陣列
    • 1.12 Type Juggling - 型態間的戰爭
    • 1.13 物件的生成
    • 1.14 區域變數
    • 1.15 全域變數
    • 1.16 $GLOBALS - 存放全域變數的陣列
    • 1.17 靜態變數
    • 1.18 以變數為名的變數
    • 1.19 變數的變數陣列
    • 1.20 讀取 form 的資料
    • 1.21 圖形的超鏈結
    • 1.22 HTTP Cookies
    • 1.23 讀取系統的環境變數
    • 1.24 常數的定義
  • 2 PHP 語法結構
    • 2.1 if 敘述
    • 2.2 搭配 else 敘述
    • 2.3 elseif 敘述
    • 2.4 while 敘述
    • 2.5 do…while 敘述
    • 2.6 for 敘述
    • 2.7 foreach 敘述
    • 2.8 break 敘述
    • 2.9 continue 敘述
    • 2.10 switch 敘述
    • 2.11 PHP 的註解
    • 2.12 REQUIRE
    • 2.13 INCLUDE
    • 2.14 REQUIRE_ONCE
    • 2.15 INCLUDE_ONCE
    • 2.16 定義常數
  • 3 數值與字串的寫法
    • 3.1 數字的寫法
    • 3.2 字串的寫法
    • 3.3 here doc syntax
  • 4 Function 與 Class
    • 4.1 function - 函數的定義
    • 4.2 了解什麼是 call by reference
    • 4.3 自訂函數的參數預設值
    • 4.4 可變長度的參數
    • 4.5 如何自訂 class
    • 4.6 $this - 我所在的類別
    • 4.7 derived class
    • 4.8 constructor - 建構子
    • 4.9 :: 運算子
  • 5 Operator 與 Expression
    • 5.1 數學運算子 (Arithmetic Operators)
    • 5.2 位元運算子 (Bitwise Operators)
    • 5.3 邏輯運算子 (Logical Operators)
    • 5.4 判斷運算子 (Condition Operators)
    • 5.5 字串運算子 (String Operators)
    • 5.6 指定運算子 (Assignment Operators)
    • 5.7 Ternary Operator
    • 5.8 單元運算子 (Unary Operators)
    • 5.9 優先序
    • 5.10 PHP 的 Expressions
    • 5.11 Simple Expressions
    • 5.12 Simple Expressions with Side Effects
    • 5.13 Complex Expressions
  • 6 學會 Array
    • 6.1 初始化陣列
    • 6.2 enumeric array 與 associative array
    • 6.3 陣列的 key
    • 6.4 多維陣列
    • 6.5 陣列的內部指標
    • 6.6 PHP 陣列函數群整理
  • 7 PHP 與物件導向
  • 8 基礎 MySQL 資料庫
  • 9 留言板系統專案演練
  • 10 使用 Template 模板系統

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub