본문 바로가기

프로그램&DB

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 .. 더보기
PHP File Handling 파일 관련 함수 PHP File Handling The fopen() function is used to open files in PHP. Opening a File The fopen() function is used to open files in PHP. The first parameter of this function contains the name of the file to be opened and the second parameter specifies in which mode the file should be opened: The file may be opened in one of the following modes: Modes Description r Read only. Starts at the beginnin.. 더보기
PHP Include File 인클루드 파일 PHP Include File Server Side Includes (SSI) You can insert the content of one PHP file into another PHP file before the server executes it, with the include() or require() function. The two functions are identical in every way, except how they handle errors: include() generates a warning, but the script will continue execution require() generates a fatal error, and the script will stop These two.. 더보기
PHP Date() Function 날짜 함수 PHP Date() Function The PHP date() function is used to format a time and/or date. The PHP Date() Function The PHP date() function formats a timestamp to a more readable date and time. A timestamp is a sequence of characters, denoting the date and/or time at which a certain event occurred. Syntax date(format,timestamp) Parameter Description format Required. Specifies the format of the timestamp t.. 더보기