1. Trang chủ
  2. » Công Nghệ Thông Tin

goodwithphp 9878

7 0 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Nội dung

Rockablepress.com Envato.com © Rockable Press 2012 All rights reserved No part of this publication may be reproduced or redistributed in any form without the prior written permission of the publishers 3 Acknowledgement Acknowledgement There might be only one name on the cover, but no one writes a book alone I am eternally grateful to the following parties: • God, for orchestrating not just the making of this book, but my whole life, really • Dad and Mom — as well as my siblings and grandparents — for their support and encouragement throughout the entire process They were, and always have been, willing springboards for ideas and invaluable advisors There’s no exaggeration in saying that without them, the book wouldn’t exist • The whole Envato crew and contractors, but especially Jeffrey, for taking me on as a writer when I’d never done any tech- or tutorial-writing before and encouraging me (whether he knows it or not) to continually become a better writer and developer; Naysan, for suggesting I write this book, and for organizing the legalities and logistics so that I could focus on the writing; Peter, for being a meticulous editor, and reigning me in when I tried to crazy things with the English language; and the book design and layout folks, who made all this tough-on-the-brain teaching so easy on the eyes • And finally, you, the reader, without whom the efforts of the aforementioned parties would be a complete waste 4 Table of Contents Contents Acknowledgement 3 Chapter What is PHP? Who is this Book For? How Do You Install PHP? 10 Installing PHP on Windows 11 Installing PHP on Mac OS X 13 PHP on Your Server 15 The Example Files 16 Summary 17 Chapter 19 PHP Files 19 Variables 20 Values 21 Strings 22 Numbers 23 Booleans 24 Null 24 Array 24 Comments 26 Operators 27 Arithmetic Operators 27 The String Operator 28 Assignment Operators 29 Incrementing / Decrementing Operators 29 Comparison Operators 30 Logical Operators 32 Conditional Operator 34 Functions 34 Code Style 36 Summary 37 Chapter Table of Contents 39 Control Structures 39 if and else (and elseif  ) 39 for / foreach 41 return / break / continue 45 switch 47 require / include / require_once / include_once 49 Final Thought on Control Structures 52 PHP Internal Functions 53 String Functions 53 Breaking Up and Getting Together 54 A Case of Changed Case 55 Keeping Thing Trimmed 56 Replacements 56 How Long? 57 Needle in a Haystack 57 Et Cetera 58 Array Functions 58 Pushin’ and Poppin’ 58 Mappin’ and Walkin’ 60 Searching High and Low 61 Slicin’ and Dicin’ 62 Sorting Things Out 64 Counting Your Chickens (After They Hatch) 64 Summing it all Up 65 Date and Time Functions 65 parse_date 65 time 66 strftime 66 Math Functions 67 max / min 67 mt_rand 67 round / ceil / floor 68 JSON Functions 68 File Functions 69 fopen 69 Reading a File 70 About the Author Andrew Burgess is a Canadian web developer, university student, and staff writer for Nettuts+, where he has published numerous popular tutorials and screencasts Andrew is also the author of the Rockable titles “Getting Good with Git,” and “Getting Good with JavaScript.” As a web developer, he specializes in JavaScript and Ruby Andrew lives with his family in Oshawa, Canada Check out Andrew’s personal site: http://andrewburgess.ca Or follow him on Twitter: @andrew8088 Now that you’ve finished Getting Good with PHP check out these related eBooks from the Rockable Press library: Getting Good with JavaScript Getting Good with Git by ANDREW BURGESS by ANDREW BURGESS MORE EBOOKS

Ngày đăng: 05/12/2022, 09:05

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN