TAILIEUCHUNG - PHP HOW TO 1

PHP HOW−TO PHP To debug PHP programs create a file "" having the followin functions : | PHP HOW-TO PHP To debug PHP programs create a file having the following functions php define this variable to prevent double declaration. if defined _DEBUG2_DEFINED_ define _DEBUG2_DEFINED_ 1 else return if this file is already included then return file name Functions for debuging the PHP source code Copyright policy is GNU GPL but additional request is that you include author s name and email on all copies Author Al Dev Email alavoor@ Usage of this functions - In your source code put something like - debug2_ _FILE __LINE__ f_somevariable f_somevariable And this will generate output in file. function debug2_ fname lname debug_var debug_value 0 Give read exec for all on directory debug2_logs chmod a rwx debug2_logs But here you need to open the file in append mode. fp_debug2 fopen debug2_logs a if fp_debug2 false print b File open failed - b exit function debug2_ fname lname debug_var debug_value 0 global fp_debug2 print br debug_value is debug_value br if debug_value fwrite fp_debug2 n . fname . . lname . debug_var else fwrite fp_debug2 n . fname . . lname . debug_var debug_value . . print br f_cookie is f_cookie br In your first page which is generally truncate the debug2_logs file in beginning of code function init_debug_file global fp_debug2 PHP 9 PHP HOW-TO fp_debug2 fopen debug2_logs w if fp_debug2 false print b File open failed - b exit system chmod a rwx debug2_logs In your PHP source code initial page which is generally put a line like php include init_debug_file all other commands follows here . . To output debug values in your PHP source code files put debug2_ calls as illustrated below php include debug2_ __FILE__ _LINE function aa aa 8 debug2_ FILE f_somevariable f_somevariable LINE__ aa aa When you run the PHP program the output will be traced in the file called

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.