This article introduces echo, print, print_r, printf, sprintf, and var_dump. For more information, see.
1. echoDefinition and usageThe PHP echo () function outputs one or more strings.
Echo "" This method can also be used without
PHP provides over 700 built-in functions. PHP functions are divided into user-defined functions and system built-in functions. Built-in functions can be used directly. User-defined functions must be defined using the keyword function.
Custom
You can obtain and subtract the start time and end time of the page through the commonly used microtime (). The calculation result is a period of time that the page has been running, however, this is not necessarily the time when the page is running.
Session is a very important thing in php. session is usually used for user login. session is much safer than cookie, at the same time, our car often uses session to save temporary records.
Simple session Creation
The Code is as follows:
When accessing the member variables or methods in the PHP class, if the referenced variables or methods are declared as const (defining constants) or static (declaring static), the operator must be used:: If the referenced variable or method is not
Variables are used to store values, such as numbers, strings, or function results, so that we can use them multiple times in the script to store values, such as numbers, text strings, or arrays.
Once a variable is set, we can reuse it in the script.
To count the first and last days of a month in php, we can use the strtotime function for conversion. The following describes two methods for your reference.
The strtotime function is mainly used. It has powerful functions and supports relative
In php, the process control statements include the while, for, if, switch, foreach, and declare statements. The following describes how to use the process control statements, I hope this method will be rent out to all of you.
In PHP, a flow control
This article will introduce you to Yii deleteByAttributs usage and use Dao's delete with caution. I hope this article will be helpful to you.
The Yii framework must use the delete Statement of Dao with caution. If it fails to generate a condition,
Most of the time, we will find our images selected on some websites, such as online resumes, and they will be immediately displayed on the current page. We often think that this kind of thing can be implemented only through ajax. Today I learned a
This article will introduce to you the Performance Comparison Between cookie verification and session verification by php users. For more information, see.
I checked a lot of information. I also thought a lot. Let's summarize it!
Does php use
Click "save", "TOP", and "step on" in the comments. Here we will make a simple implementation of mysql based on jquery ajax and php, and click "TOP" and "step on". The source code download is provided at the end of the article.
Php applications are
In php, if I want to perform operations on two arrays, such as Union, intersection, and difference set, we can directly use the built-in functions of php to perform operations such as array_merge (), array_intersect (), array_diff ().
// The
The memory_get_usage function is provided for you in php. You can check the current memory usage on your server. With this function, you can check the server status in real time. Next I will introduce the usage of memory_get_usage.
Format memory_get_
During content stations, collection software is often used to attack other station resources on the Internet, and thousands of articles are collected, after the collection, we found that there were some original site hyperlinks in the content. If I
Cookies are commonly used in php, but many friends may not know how cookies work, the following small series will help you sort out the working principles of php cookies and some examples of cookie read/write operations.
Cookie and session
Php generates a thumbnail _ php generates a thumbnail code. This is a typical and practical php code for generating a thumbnail. For a professional plain language, php generates a thumbnail code.
Generate thumbnail code in php tutorial _ phpThis is
PHP generates a 3D percentage graph statistical result this program is based on the user's data to generate a 3D percentage picture statistical effect a bit like a Chinese webmaster
Php tutorials generate 3d percentage graph statistics/*This program
This tutorial provides php beginners with an article about how to connect php to the mysql database and query and read/write the mysql database. If you need to learn, refer to the tutorial.
1. Connect to the database
Database variable file:
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service