随笔分类 -  Php

 
DB other operation
摘要:A prepared statement is a feature used to execute the same/similar SQL statement repeatedlly with high efficiency. Prepared statement basically work l 阅读全文
posted @ 2016-08-02 12:19 forever_elf 阅读(220) 评论(0) 推荐(0)
DB Create and Insert
摘要:<?php $servername = "localhost"; $username = "username"; $password = "password"; $conn = new mysqli($servername, $username, $password); if($conn -> co 阅读全文
posted @ 2016-03-10 15:58 forever_elf 阅读(346) 评论(0) 推荐(0)
Connection to DB
摘要:Connect to MySQL PHP5 and later can work with a MySQL database using MySQLi extension PDO PDO will work on 12 different database systems, where as MyS 阅读全文
posted @ 2016-03-01 17:45 forever_elf 阅读(326) 评论(0) 推荐(0)
Error Handling and Exception
摘要: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 阅读全文
posted @ 2016-03-01 17:26 forever_elf 阅读(272) 评论(0) 推荐(0)
PHP Filter
摘要:PHP filters are used to validate and sanitize external input. Validating data is determine if the data is in proper form. Sanitizing data is remove an 阅读全文
posted @ 2016-03-01 12:33 forever_elf 阅读(455) 评论(0) 推荐(0)
Session
摘要:A session is a way to store information(in variables) to be used across multiple pages.Unlike a cookie, the information is not stored on the users com 阅读全文
posted @ 2016-02-24 11:53 forever_elf 阅读(178) 评论(0) 推荐(0)
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 阅读全文
posted @ 2016-02-23 15:32 forever_elf 阅读(297) 评论(0) 推荐(0)
File
摘要:The readfile() functin reads a file and writes it to the output buffer. readfile('filename') A better method to open files is with the fopen() functio 阅读全文
posted @ 2016-02-19 14:41 forever_elf 阅读(268) 评论(0) 推荐(0)
Include and Require
摘要:The include or require statement takes all the text/codde/markup that exists in the specified file and copies it into the file that uses the include s 阅读全文
posted @ 2016-02-18 12:47 forever_elf 阅读(143) 评论(0) 推荐(0)
Date and Time
摘要:The PHP date() function is used to format date and/or a time and formats as timestamp to a more readable data and time. date(format, timestamp) //form 阅读全文
posted @ 2016-02-18 12:33 forever_elf 阅读(211) 评论(0) 推荐(0)
Arrays Multi
摘要:<!DOCTYPE html><html><body><?php$cars = array ( array("Volvo",22,18), array("BMW",15,13), array("Saab",5,2), array("Land Rover",17,15) );for ($row = 0 阅读全文
posted @ 2016-02-18 12:09 forever_elf 阅读(157) 评论(0) 推荐(0)
PHP Forms
摘要:<html><body><form action="welcome.php" method="post">Name: <input type="text" name="name"><br>E-mail: <input type="text" name="email"><br><input type= 阅读全文
posted @ 2016-02-18 12:00 forever_elf 阅读(350) 评论(0) 推荐(0)
simple grammer
摘要:<?phpecho strlen("Hello world!"); // outputs 12?> <?phpecho str_word_count("Hello world!"); // outputs 2?> <?phpecho strrev("Hello world!"); // output 阅读全文
posted @ 2016-02-16 18:45 forever_elf 阅读(410) 评论(0) 推荐(0)