This article, will make a simple summary of these questions, so that everyone can consult.1.Error tipsWarning:cannot send session Cookie-headers already sentWarning:cannot Send session cache Limiter-headers already sentAnalysis and Solving
First, file system securityIf PHP has root permission and the user is allowed to delete files in the script, then the user submits the data without filtering and it is very likely that the system files will be deleted.
Deletes the specified file
Use session and cookies to save user login information at the same time
1. Database Connection Configuration page: connectvars.php
Copy Code code as follows:
Location of the database
Define (' Db_host ', ' 127.0.0.1 ');
User
Use PHP to invoke the Java language development webservice.The client submits two string parameters, and the service side returns an object type.The service side uses AXIS-1.4 as the SOAP engine. The client is PHP5.2.9, using Nusoap as the SOAP
Wrote a small thing to record Baidu and Google for the site included, now can query, in fact, it is not difficult, is to file the remote files, and then analysis.
Yes, looks like Google PR thing is just a file address, so said there is no
Brief introduction:Ajax is made up of HTML, javascript™ technology, DHTML, and DOM, an excellent way to translate clumsy web interfaces into interactive Ajax applications.
For Ajax, the core object is XMLHttpRequest, all AJAX operations are
Copy Code code as follows:
Iconv (' GBK ', ' utf-8//ignore ', ' cloud-dwelling community '); Converts a string from GBK encoding to UTF-8 encoding
However, the iconv can only solve the situation in which the encoding is known, and
Count the number of user Inbox space, first calculate the size of each message (title + content + near), after the sum;1, calculate nearby size;2. Calculate title and content size3, total to find a single message sizeCase:
Copy Code code as
Magic Reference function for data in PHP MAGIC_QUOTES_GPC or magic_quotes_runtime
When set to on, the data we reference encounters single quotes ' and double quotes ' as well as backslashes, which automatically adds backslashes to help us
Get the value of the form request:
Case:
request.php
Copy Code code as follows:
Calculation Request
[Code]
result.php
[Code]
$grade =$_request[' Grade '];//grade--> the same as the name value in the form
The use of multilayer arrays and object transformations is simple and facilitates the processing of multilayer arrays and objects in webservice.
Simple (array) and (object) can only handle single layer of data, and for multiple layers of array and
I believe you and I will often see PHP code similar to the following:
Copy Code code as follows:
$user = new StdClass ();
$user->name = ' Gouki ';
Such code, what is this for?Turn on the manual, search the Stdclass, you will
Nginx CacheNginx has two types of caching mechanisms: Fastcgi_cache and Proxy_cacheLet's talk about the difference between the two caching mechanisms.The Proxy_cache function is to cache the contents of the backend server, possibly any content,
PHP CURL Session COOKIE
You can invoke system commands, and you can do this:
Copy Code code as follows:
function Dirsize ($dir) {
@ $dh = Opendir ($dir);
$size = 0;
while ($file = @readdir ($DH)) {
if ($file!= "." and $file!= "...") {
First type:
Or
The second type:
PHP implementation of the two methods of downloading files. Share, useful friends to see OH.
Method One:
Learn about the use of header functions in PHP.
A more interesting example of code auditingLooks like last year's ecshop payment loophole.An example of accidental coming out, it feels good. Share under
Copy Code code as follows:
$a =addslashes ($_get[' a ']);
$b =addslashes ($_get[' B
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