The PHP Setcookie () function sends an HTTP cookie to the client. A cookie is a variable that is sent by the server to the browser. Cookies are usually small text files that the server embeds into the user's computer. This cookie is sent whenever
Let's take a look at how to set up the session in PHP.ini.
Open php.ini to find one of the following in the Session Settings section:
The code is as follows
Copy Code
Session.save_path = "N;/path"Session.save_path = "C:/
1, If ... Else loop there are three kinds of structures the first is to use the IF condition as a simple judgment.
Explained as "What to do if something happens".The syntax is as follows: if (expr) {statement} The expr in which the condition is
Phpstorm+xdebug How to debug local code, the code should be familiar. This article is about how to debug the code for the online server. My PHP environment is lnmp1.2.
Install Xdebug
Executing on the server
PECL Install XdebugThe Xdebug.so module
Author: Well Middle Moon
Java is a very powerful programming tool, its extension library is also very useful, this tutorial, mainly on how to use PHP invoke powerful Java class library (classes). To facilitate your study, this tutorial will
PHP is easy to get to the mtime of a folder, you can use the Filemtime function. But the Filemtime for the folder is due to Linux. When a file is modified, it only affects his current folder Mtime changes. Does not continue to affect folders at the
Verification Code picture HTML code:
The first image authentication code class, the other 6 kinds of authentication code class please download view:
Class captcha{/**+----------------------------------------------------------* Generate
SQL injection attacks are the most common means by which hackers attack Web sites. If your site does not use strict user input test, it is often easy to be SQL injection attacks. SQL injection attacks are usually implemented by submitting bad data
File read and write operation in PHP
PHP provides a series of I/O functions that simplify the functionality we need, including file system operations and directory operations (such as "Copying [Copy]"). The following is to introduce the basic
General email, form such as zhangshan@163.com,abc@sina.com.cn some commonly used forms on the line, but in our company some customers in the mailbox but there are some zhangshna. Mr@163.com,abc_wang.dd@sian.com,abc_wang.dd.cc@sian.com this similar
1. For the general variable, the variable into a PHP language format, written to the file, as long as the include this file is equivalent to loading the cache;2. For the array-type variables, the array into the PHP language definition array string,
XML-RPC data types
XML-RPC supports only a limited number of data types. The following are the corresponding relationships to the PHP data types:
Useful Inc.-XML-RPC implementation-PHPXMLRPC
The XML-RPC Toolkit we use is made by Useful, Inc. 's
First, use the cache
To turn on the Smarty cache, simply set the caching to True and specify Cache_dir.
Use Cache_lefetime to specify the cache lifetime, in seconds
To generate multiple different caches for the same page, add a second parameter
Nginx configuration fileServer {Listen 80;...................# This is to define the beginning of the url for reading the directory of your fileLocation/files {Internal;Alias/home/lvtao.net/upload; }....................}Write a simple demo
First, I would like to say that the articles on Baidu are all nonsense!There are some similarities and differences, but they do not explain the reasons. If they are not verified, they will be transferred to each other, wasting the audience time.The
There are many methods for paging in Smarty.1. Use the pagination plug-in of Smarty, such as Pager, pagnition, and sliding_page. However, these plug-ins are not very good, and almost all of them have bugs.If you are interested in trial and
Obtain the real IP address of a user The code is as follows:Copy code Function get_client_ip (){ If (getenv ("REMOTE_ADDR") & strcasecmp (getenv ("REMOTE_ADDR"), "unknown ")) { $ Onlineip = getenv ("REMOTE_ADDR ");Return $ onlineip;
Function turntopage ($ url = "index. php", $ info = "page redirection...", $ second = 2 ){Print " n n page turning... n ";Print " n"; // open source code 111cn.netPrint " n ";Print " n n ";Print " n ";// 111cn.netPrint " n ";Print " n ";Print "
This method is not run in the popular apache + php Tutorial _ module mode. I use nginx as a web server and run php in fastcgi mode.Compile in linux:Nginx I am still used to choosing version 8.54. Its compilation depends on the following software
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