tailieunhanh - A Programmer’s Introduction to PHP 4.0 phần 5

Một chính sử dụng các phương pháp để thao tác các thuộc tính khác nhau tạo thành lớp. Tuy nhiên, những thuộc tính được tham chiếu trong các phương pháp sử dụng một biến đặc biệt gọi là $ này. Hãy xem xét ví dụ sau đây cho thấy việc sử dụng cú pháp này: | File I O and the File System Increment the nbsp count Recursive call to display_directory function display_directory file folder_location using_linux init_depth Not dealing with a directory else Build path In accordance with what OS Is being used. if using_linux 0 tab_depth current_depth - init_depth - 2 x 0 calculate tab depth while x tab_depth 2 5 print nbsp x endwhile print a href . dir. .basename file . .basename file . a br else print a href . dir. .basename file . .basename file . a br endif endif Is_dir file endif If . or . endwhile close the directory closedir dh html head title print page_name title head body bgcolor ffffff text 000000 link 000000 vlink 000000 alink 000000 calculate Initial tab depth if using_linux 0 depth explode beg_path 171 Chapter 7 else depth explode beg_path endif init_depth sizeof depth display_directory beg_path folder_location using_linux init_depth body html Executing this script on the directory pointing to the folder I am using to organize a few of the chapters of this book displays the output shown in Figure 7-1. Figure 7-1. to display the structure of a server directory 172 File I O and the File System What s Next This chapter introduced many aspects of PHP s file-handling functionality in particular Verifying a File s Existence Opening I O and closing I O Writing to and reading from a file Redirecting a file directly to output External program execution Working with the file system These topics set the stage for the next chapter Strings and Regular Expressions as string manipulation and I O manipulation go hand in hand when you are developing PHP-enabled Web applications. With that said let s forge ahead .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.