tailieunhanh - PHP & MySQL Everyday Apps for Dummies phần 10

Chức năng htmlentities được sử dụng trên dòng 18 để chuyển đổi bất kỳ thẻ HTML trong chủ đề cho các đối tượng. Điều này bảo vệ chống lại nguy hiểm văn bản nhập vào biểu mẫu bằng cách kẻ xấu. Chức năng addslashes được sử dụng để thoát khỏi dấu ngoặc kép trong vấn đề này. Nếu | 386 Part VI Appendixes_ Objects and classes The basic elements of object-oriented programs are objects. It s easiest to understand objects as physical objects. For example a bicycle is an object. It has properties such as color model and tires which are also called attributes. A bike has things it can do too such as move forward turn park and fall over. In general objects are nouns. A person is an object. So are animals houses offices customers garbage cans coats clouds planets and buttons. However objects are not just physical objects. Often objects like nouns are more conceptual. For example a bank account is not something you can hold in your hand but it can be considered an object. So can a computer account. Or a mortgage. A file is often an object. So is a database. Orders e-mail messages addresses songs TV shows meetings and dates can all be objects. A class is the code that is used to create an object the template or pattern for creating the object. The class defines the properties of the object and defines the things the object can do its responsibilities. For example you write a class that defines a bike as two wheels and a frame and lists the things it can do such as move forward and change gears. Then when you write a statement that creates a bike object using the class your new bike is created following the pattern in your class. When you use your bike object you might find that it is missing a few important things such as a seat or handlebars or brakes. Those are things you left out of the class when you wrote it. As the person who writes a class you know how things work inside the class. But it isn t necessary to know how an object accomplishes its responsibilities in order to use it anyone can use a class. I have no clue how a telephone object works but I can use it to make a phone call. The person who built the telephone knows what s happening inside it. When new technology is .

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.