In the development process, the output parameters of the MSSQL stored procedure may not be obtained. many friends do not know what to do, this article will introduce in detail how to obtain the output parameter function of mssql stored procedure in
In the php5 environment, our $ _ SERVER variable will no longer be protected by magic_quotes_gpc. As for how the program can enhance its security, we will summarize how to protect the cookies in php, get, post and files data. For more information,
To optimize the internal link, we need to add the key link to the content. how can we add the link if the content is added? Method 1: manually edit and add
Method 2: use a program to output content without affecting the editing of background content.
First, this question is a bit problematic because the private attribute cannot be inherited. please read this sentence carefully if the parent class has private attributes. The method of the parent class serves only the private attributes of the
The php program file generates content to the Word document and provides the download function implementation code. For more information, see
This article mainly solves two problems:
1: how to generate html content into Word documents in php
2:
I have been touched by the page cache of phpcms over the past few days. The benefits of it is not much said, it is generally used in the database query more pages, for insert modification and deletion of the page is not suitable for the cache here a
The function that intercepts characters based on the utf8 encoding rules. The utf8 version of sub_str supports 1 ~ 6-byte characters are intercepted, not only for Chinese characters.
The code is as follows:
/*
* Function: Similar to substr, it does
If you are idle, you can get the template function, which is rough. It mainly uses regular expressions to convert a template file (html file) into a php file to implement frontend and backend separation. this is the so-called mvc idea. I have read
The scope of a variable is the context defined by the variable (that is, the range in which it takes effect ). Most PHP variables have only one separate range. This separate range span also contains the files introduced by include and require, for
PHP Object-Oriented Learning Note 2: Design mode for generating objects
1. Singleton)If an application contains only one object at a time, this object is a singleton to replace global variables.
The code is as follows:
Require_once ("DB. php
A project was created last year to list the text list of the image files uploaded by the user. after clicking a file name, the user can display the image. today, I have the opportunity to reconsider this function. I found several lines of code in
As expected, the actual test results are the fastest to write directly, which takes about 13 of the other methods. The other two methods are similar. In contrast, SimpleXML is faster than the three methods used to generate XML files in PHP.
There
Use single quotes instead of double quotes to include strings, which is faster. Because PHP will search for variables in strings enclosed by double quotes, but not in single quotes. Note: Only echo can do this. it is a function that can treat
Php concurrency causes pressure on MYSQL. if you need a friend, please refer to the PHP page where there is a browser count of 200 concurrency per second, resulting in great pressure on mysql caused by insert.
In the lnmp environment, other page
On the Internet, I saw a very interesting function for converting the php RMB amount to the Chinese capital. The essence of this function is to convert the numbers to the Chinese capital. I tested it. it's very interesting. just enter a number at
It is difficult to prevent the forgery of cross-site requests, and the danger is huge. attackers can use this method to prank, send spam information, and delete data. So how can we prevent the forgery of cross-site attacks? yahoo's solution to the
PHP uses the curl method to post data to the api interface. most of the HTTP requests of the API are GET. therefore, no matter AJAX or PHP is used for secondary processing, the returned data can be obtained, however, the HTTP request method of some
This article mainly introduces the design mode of php. it mainly introduces the three modes below, including the Singleton mode, Factory mode, and observer mode.
1. Singleton mode
The Singleton mode means that only one instance of this class exists
When exporting data to excel, the number becomes scientific count. if you need it, you can refer to the following two situations.
1. insufficient length for excel cellsSolution:
The code is as follows:
// In the excel. php file
$ ObjActSheet = $
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