There are three classes to share simple php database writing code:
1. filter input (lightweight)
Class input_filter
Filters parameters, such as $ _ GET and $ _ POST.
The return value type is an array and is used as a parameter of the made_ SQL class.
This article mainly introduces the simple PHP form submission instance, the interest friend's reference, hoped to be helpful to everybody.
The instance code is as follows:
Name: password: age: 16 "> Less than 16 16-30 31-50 51-80 &
Simple php shopping cart implementation code and example
Session_start ();
$ Conn = mysql_connect ("localhost", "root", "admin ");
Mysql_select_db ("songyu ");
// Check the number of times the
Now programmers are becoming more and more difficult, to be proficient, to find a source of origin, in fact, the current flooding of the more advanced language and a lot of frameworks just the opposite, because they are as far as possible to cover
What happens, you may experience performance issues:
Improper use of 1.php syntax2. Use the PHP language to do what it is not good at3. A service that is connected in PHP language does not give force4.php of its own short board5. I do not know the
Simple php development framework --- litephp
This framework is written in my spare time. lightweight and efficient. templates and caches are available (Dz templates are used), and they do not adopt the complex mode of classes and objects. use
uploading.class.php Upload class
Class Upimages {var $annexFolder = "Upload";//Attachment storage point, default: Annexvar $smallFolder = "small";//thumbnail storage path, note: Must be placed under the $annexFolder subdirectory, default:
File upload. LINUX+APACHE+PHP3/4 test passed. IIS test failed, win+apache+php not tested
if ($HTTP _post_vars["upload"]== "upload") {
file://Here you can add check file name, format, image size and other functions,
file://$picurl The full path of
First write the front end: Write on the 10.html page
htmlxmlns="http://www.w3.org/1999/xhtml"lang="ZH-CN"> head>metahttp-equiv="Content-type"Content="text/html; Charset=utf-8 ">title>10
title
>metaname="description"content="" />
Head
>
Copy CodeThe code is as follows:
function Yzm ($name, $width, $height) {Header ("Content-type:image/png");Srand (Double) microtime () *1000000);//sow a seed that generates random numbers to facilitate the use of random number generation
This article introduces a simple php file Upload sample code for beginners. if you need to learn it, you can refer to it.
// Define the prompt functionFunction alert ($ msg ){Return'
Simple PHP cookie user login instance. One of the purposes of cookie is to store the user's password and id on a specific website. It is also used to store the preference of the start page. One of the purposes of your web cookies is to store the
Write a simple php template engine by yourself
The core idea in the template engine is that the variables in the template are compiled into PHP variables for output.
Example: DEMO.TPL
{$data} {$title}
The template engine then compiles {$data}
A simple PHP drawing problem 、、、
I write the following code on the PHP page:
Header (' Content-type:text/jpeg '); This place can be executed correctly if it is annotated.
$im =imagecreatetruecolor (200,200);
Imagepng ($im);
?>
If the above place
Introduction: this is a simple PHP cache design details page, introduced and PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 355240
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.