TAILIEUCHUNG - Thiết kế mạng xã hội với PHP - 19

Tham khảo tài liệu 'thiết kế mạng xã hội với php - 19', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Profiles and Statuses return false else l strlen _FILES postfield name - i ext strtolower substr _FILES postfield name i 1 l if in_array ext this- uploadExtentions if in_array _FILES postfield type this- uploadTypes name str_replace _FILES postfield name this- name name_prefix . name path moveto . name_prefix. name move_uploaded_file _FILES postfield tmp_name path this- loadFromFile path return true else invalid type return false else invalid extention return false else not uploaded file return false 162 Download from Wow eBook Chapter 5 Get the image name return String public function getName return this- name When we have finished processing an image the save method finds the appropriate image function for the format of the image and then saves the file. Save changes to an image . after resize param String location location of image param String type type of the image param int quality image quality 100 return void public function save location type quality 100 type type this- type type if type IMAGETYPE_JPEG imagejpeg this- image location quality elseif type IMAGETYPE_GIF imagegif this- image location elseif type IMAGETYPE_PNG imagepng this- image location 163 Download from Wow eBook Profiles and Statuses Back to the controller Now we have an excellent class available to process our profile image uploads which should make things much easier for us let s look at actually allowing the user to edit their profile page with a new function in our profile information controller controllers profile . Edit your profile return void private function editProfile if this- registry- getObject authenticate - isLoggedIn true We first check that the user is logged into the site and if they are we get their user ID. user this- registry- getObject authenticate - getUser - getUserID if isset _POST count _POST 0 If the edit form has been submitted include the model and set the new values. edit form submitted .

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.