1. Use header header to set cache control header Cache-control.
PHP code1.
The code is as follows
Copy Code
Header (' Cache-control:private, Must-revalidate '); Support page Bounce
2. Use the
If you want to use the Fsockopen function we must set the Allow_url_fopen = on in the php.ini to the open state.
Cases
Fsockopen () Example
code is as follows
copy code
$fp = Fsockopen ("www.example.com",
First, introduce the requirements background:
Invoice method:0= donation (Don't ask me why, historical reasons)1= sent to China2= Request3= Electronic Invoice
Now you want to test the data submitted by the User:
if (!in_array ($_post['
Online search die and exit two functions, most of the "standard answer" is that die is to exit and release memory, exit is exited but does not release memory. This explanation is clearly wrong, as the PHP manual has said, "Die-equivalent to exit."
1. First, let's introduce the fopen () functionHere we give a demo of the code that opens the local file directly, and we have added a note to the necessary places:
The code is as follows
Copy Code
//Directly open
Definitions and usage
The file_exists () function checks whether a file or directory exists.
Returns true if the specified file or directory exists, or FALSE.
Example 1
The code is as follows
Copy Code
Echo
Introduction: This is the introduction of PHP and file operations related to the system functions, these functions are also very important, the following tianya is still more commonly used for detailed illustrations.
basename-returns the file name
How to turn off Win7 system Automatic Update
1. Create a new text document in any location;
2. Open the new text document and copy the following code:
@echo off disable the Win7 auto running
netsh interface tcp set global rss=disabled
netsh
Encoding json in PHP (Json_encode)
The PHP Json_encode () function is used in PHP JSON encoding. This function returns the value represented by the JSON successfully and returns false if it fails.
Grammar:
String Json_encode ($value [, $options =
How does the program run in PE? To mount a WIM is one of the ways The following is an example of opera.wim, assuming that the opera.wim contains two files, one opera.exe, another opera.cmd, and the key part is Opera.cmd, with the following code:
Usually read the error log PHP, very few opportunities to write their own log, saw Wang Jian's "Best log Practice" that write a clear, structured log is still very necessary.
Before writing a journal, we ask ourselves: why do we sometimes have to
First of all, I would like to introduce PHP to execute the Linux system commands several basic functions. For a long time I have been confused about the specific usage differences of the following functions.system functionDescription: Execute
How to clean up XP system junk files
First "New Notepad" copy the following code!
@echo off
ECHO is clearing the system garbage file, please wait ...
del/f/s/q%systemdrive%*.tmp
del/f/s/q%SYSTEMDRIVE%*._MP
del/f/s/q%systemdrive%*.log
Protobuf the applicable languageAuthentic (Google's own in-house) Protobuf supports three languages: Java, C + +, and Pyton, and unfortunately does not support languages such as. Net or Lua, but the power of the community cannot be overlooked
Every programmer and developer likes to talk about their favorite pieces of code, especially when PHP developers spend hours coding or creating apps for the web, they know the importance of the code. In order to save the coding time, the author
In PHP, the definition of a string can be in English single quotes ', or you can use double quotes in English.
But you must use the same single or double quotes to define strings, such as ' Hello World ' and ' Hello World ' for illegal string
Core code:
@echo off
:: Code from User: Liangbch
setlocal enabledelayedexpansion
echo to calculate n^^!
set/p nn=n=?
set/a "Buff_1=1,rad=10000,len=1"
for/l%%i in (1,1,%nn%) do (set/a cc=0-for/l in
(%%j) do (
set/a "tt=buff_%%j*%%i+
Good PHP code should be structured.
Good PHP code should be standardized.
Good PHP code should be adaptive.
Good PHP code should be safe.
What are the pros and cons of PHP code?
1. PHP code that has not been optimized
Echo ("
Search results
1. Regular backup of important data
With the gradual advancement of Informatization and the popularization of information technology, the dependence degree of each unit on LAN network is more and more high, and the data information stored in LAN
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.