When doing Web application development sometimes do such an operation, is to modify the Hosts file to do virtual domain name mapping to facilitate local development, For example, the www.phpernote.com this domain name to the local 127.0.0.1, this
The function of PHP to remove duplicate values of an array can also be understood as removing duplicate values of an array.
/*** the difference between the array and the Array_unique function: it requires Val to be a string, and this can be an
There is no need to use Var in PHP, but when a variable is a member of a class, using Var is no problem.
In fact, this is a very easy problem to solve. In my opinion, familiar, hehe, recently learned JavaScript has learned to use VAR declaration
As a walking river for many years old Chinese medicine, today ordered to solve a case of front-end page display slow problem. The following is the case for the issue page:
Apache + PHP
Output content using the Smarty template
The final output
How do I use constants defined by define in the Smarty template?
The method is: {$smarty. Const. The constant name you defined}
Articles you may be interested in
Smarty extension for loop in template
TD in Smarty template with circular form
In the development process, often encounter need to provide someone with an input box, and then others enter some ID, or keyword things, such as the WordPress background tag input box:
This is just to judge the English state of the comma, if
In almost all object-oriented programs, there are one or two resources that are created and used consistently in program applications. For example, such a resource is used in a database connection to an e-commerce program: The connection is
In addition to being able to write code smoothly, a good PHP programmer needs to have the ability to keep the program in a secure environment. Today we are going to talk about PHP to prevent SQL injection related methods.
When it comes to website
Download address (GITHUB.COM/MASTEREXPLODER/PHPTHUMB).
Note that this class library has a name called Phpthumb, only the difference in capitalization, so be careful when looking for documents.
In the site construction process, the need to deal with
As a PHP programmer must know 40 tips for optimizing PHP code:
1. If a method is static, make a static declaration of it. The rate can be increased to 4 times times.
2.echo is faster than print.
3. Use Echo's multiple parameters (meaning: a comma
For a long time did not use Smarty to do projects, and today suddenly to change their own website inside some things, because my site is a long time ago with smarty template engine do, change some places on the feeling still have to search the
This article mainly introduces the PHP picture clipping function, while maintaining the image is not deformed, the need for friends can refer to the next
In order to complete the image after uploading the automatic cropping, and then in the
Before the column is very few, the dead way to do (the name of the column), now more columns, gradually two columns, three columns also came, this way is obviously not suitable, so it improved a bit. It is not difficult to use a recursive function
The header information is defined first, indicating that an Excel is output. And then in the form of table to the database of the information loop echo out, just fine.
Copy the Code code as follows:
Header ("Content-type:application/vnd.ms-excel"
In real life and in the world of procedure, order is always important--I can't imagine what a world without order would look like! PHP arrays are no exception. PHP provides four sets of functions for the ordering of PHP arrays, the first three are
1. Executing SQL statements in PHP
To get the data from the database, PHP first executes a SQL statement for the table operation, including SELECT, INSERT, UPDATE, or DELETE statements. In general, executing a SELECT statement in PHP will find some
About memcached and memcached How to use, here is not said, the reader can refer to this site's articles:
What is memcached? Memcache What should I use?
This article focuses on how to install and configure the Memcached service in a Windows
First, we now look at a simple example:
Copy CodeThe code is as follows:
$a = 2;
($a = = 1)? $test = "Enterprise": $test = "region"; #写法一
Echo $test;
?>
The above example, first determine whether a $ A is 1 if the "enterprise" this string into the $
1, install Nginx
sudo apt-get install Nginx
All configuration files are under/etc/nginx, and the virtual host is configured under/etc/nginx/sites-available
Program Files in/usr/sbin/nginx
The logs were put in/var/log/nginx.
and has created a
PHP Directory Traversal code that lists all folders and files under the specified directory or path. This in peacetime, is a relatively basic function, PHP built-in functions for us to provide a lot of convenience to achieve this function, overall,
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