10 days to learn php 4 days objective: to learn how to connect to a database
PHP is simply a function library. rich functions make some parts of PHP quite simple. We recommend that you use a PHP function manual.
Let me briefly talk about
Php code optimization and php problems summary 1. when passing an array in a function
Using return is more efficient than using global
For example
Function userloginfo ($ usertemp ){$ Detail = explode ("|", $ usertemp );Return $ detail;}$ Login =
Php Data structure and algorithm (PHP description) search and binary search. For more information, see
The code is as follows:
/*** Search***/// Sequential searchFunction normal_search ($ arrData, $ val ){$ Len = count ($ arrData );If ($ len = 0
A class is like a template that defines the nature and behavior of a concept or a real thing. Class provides a basis for creating a specific instance of an object (that is, the object modeled by this class) on this basis, these specific instances
Sometimes, we want to output a variable. if it is an array, var_dump. if it is a string or something like that, we can echo it. the is_scalar built-in function will be used in this case.
Is_scalar -- checks whether the variable is a scalar.
One day, I thought I hadn't reviewed the design pattern for a long time. After reviewing a design pattern, find the source code that uses this pattern in ZF. if you do not read all the source code, read the "advanced" part. let's talk about the
Minimal data transmission-storing data on the client to output programs to other languages is one of the favorites of programmers. on the WEB, we have
Two different programming environments: the client (browser) and the server, according to the HTTP
In recent years, the World Wide WEB (also known as the Global Information Network (WWW) has continuously changed the face of information processing technology. WEB has quickly become an effective medium for people to communicate and collaborate with
The alternative usage of classes -- the alternative usage of data encapsulation classes -- Data encapsulation
Generally, if you use classname: property, you cannot access the attributes of the class, but you can use classname: method () to use the
Array processing functions are very common in PHP Development. learning array processing functions is crucial. array processing functions involve the creation of arrays, the conversion of strings from arrays to XML, and the conversion of arrays to
To compare two numbers, if they are of different types, such as float and int, the operation first converts the two numbers into comparison operators of the same Erlang type.
OpDescription = equal to/= not equal to =
= Greater than or equal to>
Use sockets in php: obtain articles from newsgroups. PHP can open Socket ports on remote or local hosts. This article is a small example of using Socket: connect to a Usenet newsgroup server, talk to the server, and download some articles from the
A program for displaying weather forecasts has just begun learning PHP. I first compiled a program and put it on my home page to show the weather forecast. of course it is still not perfect. I hope you can give me some comments. The procedure is as
The password is correct and the specified content is displayed.
The code is as follows:
$ Password = "1234"; // Here is the password$ P = "";If (isset ($ _ COOKIE ["isview"]) and $ _ COOKIE ["isview"] = $ password ){$ Isview = true;} Else {If
Debug_print_backtrace () is a very low-key function, which is rarely noticed. however, when an error occurs when I call another object to call another object and a function in another object or file, it is smiling. if we want to know who calls a
An ORACLE paging program is very practical.
Paging Test
// How to split the result into pages, like 'limit' in MySQL?
// ================================================ ==================================
// Tutorial by Neil Craig
When you are constantly trying to discover new features from your application, do you find that the solution you proposed is similar to something you have previously implemented? 1. factory model
The main function is to reduce coupling.
The code
Use the GET variable in PHP after PHP4.1.0 to save HTTP_GET_VARS with The GET variable. The GET variable mainly comes from the following methods:
For example, the URL that requests the server to obtain information, use the form method as the get
PhpMyAdmin has export. php: Missingparameter: whatexport_type error. if you encounter the same problem, refer to the problem that PhpMyAdmin cannot export data. after clicking export, a request fails or a white page is displayed. an error is
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