본문 바로가기

프로그램&DB/PHP

PHP Filter 필터 관련 레퍼런스 PHP Filter PHP filters are used to validate and filter data coming from insecure sources, like user input. What is a PHP Filter? A PHP filter is used to validate and filter data coming from insecure sources. To test, validate and filter user input or custom data is an important part of any web application. The PHP filter extension is designed to make data filtering easier and quicker. Why use a .. 더보기
PHP Exception Handling 예외 처리 PHP Exception Handling Exceptions are used to change the normal flow of a script if a specified error occurs What is an Exception With PHP 5 came a new object oriented way of dealing with errors. Exception handling is used to change the normal flow of the code execution if a specified error (exceptional) condition occurs. This condition is called an exception. This is what normally happens when .. 더보기
PHP Error Handling 에러코드 및 대처 예문 PHP Error Handling The default error handling in PHP is very simple. An error message with filename, line number and a message describing the error is sent to the browser. PHP Error Handling When creating scripts and web applications, error handling is an important part. If your code lacks error checking code, your program may look very unprofessional and you may be open to security risks. This .. 더보기
PHP Secure E-mails 보안 이메일 PHP Secure E-mails There is a weakness in the PHP e-mail script in the previous chapter. PHP E-mail Injections First, look at the PHP code from the previous chapter: 더보기
PHP Sending E-mails 이메일 발송(보내기) PHP Sending E-mails PHP allows you to send e-mails directly from a script. The PHP mail() Function The PHP mail() function is used to send emails from inside a script. Syntax mail(to,subject,message,headers,parameters) Parameter Description to Required. Specifies the receiver / receivers of the email subject Required. Specifies the subject of the email. Note: This parameter cannot contain any ne.. 더보기
PHP Sessions 세션 관련 함수 PHP Sessions A PHP session variable is used to store information about, or change settings for a user session. Session variables hold information about one single user, and are available to all pages in one application. PHP Session Variables When you are working with an application, you open it, do some changes and then you close it. This is much like a Session. The computer knows who you are. I.. 더보기
PHP Cookies 쿠키 관련 함수 PHP Cookies A cookie is often used to identify a user. What is a Cookie? A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With PHP, you can both create and retrieve cookie values. How to Create a Cookie? The setcookie() function is used to set.. 더보기
PHP File Upload 파일 업로드 관련 함수 PHP File Upload With PHP, it is possible to upload files to the server. Create an Upload-File Form To allow users to upload files from a form can be very useful. Look at the following HTML form for uploading files: Filename: Notice the following about the HTML form above: The enctype attribute of the tag specifies which content-type to use when submitting the form. "multipart/form-data" is used .. 더보기