Danh mục

PHP5 and MySQL Bible (P2)

Số trang: 20      Loại file: pdf      Dung lượng: 389.59 KB      Lượt xem: 13      Lượt tải: 0    
Hoai.2512

Hỗ trợ phí lưu trữ khi tải xuống: 20,000 VND Tải xuống file đầy đủ (20 trang) 0

Báo xấu

Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

This first chapter is an introduction to PHP, MySQL, and the interactionof the two. In it, we’ll try to address some of the most commonquestions about these tools, such as “What are they?” and “Howdo they compare to similar technologies?” Most of the chapter istaken up with an enumeration of the many, many reasons to choosePHP, MySQL, or the two in tandem. If you’re a techie looking for someammunition to lob at your PHB (“Pointy-Haired Boss” for those whodon’t know the Dilbert cartoons) or a manager asking yourself whatis this P-whatever thing your geeks keep whining to get, this chapterwill...
Nội dung trích xuất từ tài liệu:
PHP5 and MySQL Bible (P2)xxviii Contents Translating between Variables and Arrays . . . . . . . . . . . . . . . . . . . . . . . . 416 Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 Printing Functions for Visualizing Arrays . . . . . . . . . . . . . . . . . . . . . . . . . 418 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 Chapter 22: String and Regular Expression Functions . . . . . . . . . . . . 421 Tokenizing and Parsing Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 Why Regular Expressions? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 Regex in PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 An example of POSIX-style regex . . . . . . . . . . . . . . . . . . . . . . . . . . 425 Regular expression functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 Perl-Compatible Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 Example: A Simple Link-Scraper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 The regular expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 Using the expression in a function . . . . . . . . . . . . . . . . . . . . . . . . . 432 Advanced String Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 HTML functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 Hashing using MD5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 Strings as character collections . . . . . . . . . . . . . . . . . . . . . . . . . . 436 String similarity functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 Chapter 23: Filesystem and System Functions . . . . . . . . . . . . . . . . . 439 Understanding PHP File Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 File Reading and Writing Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 File open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 File read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 Constructing file downloads by using fpassthru( ) . . . . . . . . . . . . . . . . 444 File write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 File close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 Filesystem and Directory Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 feof . . . . . . . . . . . . . . . . . . . . . . . . ...

Tài liệu được xem nhiều: