In general, if we're going to import data from an Excel database into a MySQL database, we have nothing to do with it, but it's easy to get out of control with PHP Excel.
This code has been used in thinkphp.
1. Introduction of Classes
The
This article to give you a summary of some commonly used in PHP anti-PHP injection, SQL injection of some methods introduced, in PHP provides HTMLSPECIALCHARS/ADDSLASHES/STRIPSLASHES/STRIP_TAGS/MYSQL_ Real_escape_string, such as several functions,
PHP tutorial output Excel format file
If you want to take advantage of the PHP output Excel format file, you must use the header Content-type:application/vnd.ms-excel to achieve. As follows
$filename = name. XLS ';
Header
For example: Asked to select the No. 3000 page of tbllendlist records, each page 100 records.
----------
Method 1:
----------
Select Top * from Tbllendlist
where Fldserialno not in
(
Select Top 300100 fldserialno from Tbllendlist
ORDER BY
Email regular expressions and URL regular expressions There are two regular expressions about email regular expression and URL regular expression validation, which is very useful, the regular expression about email can get all the mailbox address in
The SQL Server transaction log may be filled, which prevents subsequent database operations, including update, DELETE, INSERT, and checkpoint.
Filling the transaction log will result in a 1105 error:
Can ' t allocate space for object syslogs in
Code for the PHP shopping cart
Published by: [Longlong16] Time: [2006-11-1]
if (! $session &&! $scid) {
$session = MD5 (Uniqid (rand ()));
Setcookie (SCID, $session, Time () + 14400);
}/* Last number was expiration time in seconds, 14400 sec =
FCKeditor Editor is a support multi-language multi-page online editor, he can support asp,asp.net,jsp,php, but it is not the default PHP but ASP oh, let's see how to configure the FCKeditor editor in PHP.
Download after decompression for the folder
1. Use MyISAM instead of InnoDB
The MySQL tutorial has many database tutorial engines, but the most likely thing you'll encounter is MyISAM and InnoDB.
MySQL is using MyISAM by default. However, in many cases this is a bad choice unless you are
PHP Tutorials Support Gb2312,uft-8 in English character intercept function
0xa0) { $tmpstr. = substr ($str, $i, 2); $i + +; } else $tmpstr. = substr ($str, $i, 1); } return $tmpstr;}? >
The above two
The default script execution time-out in PHP is 30 seconds, if you haven't set it up for 30 seconds and if your script has not finished executing it will time out, let me give you a big explanation of how the PHP script executes the timeout.
The
Static page looks good you can not call the PHP file directly, but there is a way to invoke the PHP file using JS call, of course, you can also use Ajax to call PHP files Oh, I would like to introduce to you
Give a simple example to illustrate:You
Wrote a way to set up a PDO DSN, and I want you to see
Oracle and SQLite have only the database host, not even the database name, I do not know how to set.
Give it to everybody. Private Function Setdsn ()
{
Switch (Strtoupper ($this->datatype)) {
Today found a very strange thing oneself in the Mac installed Mamp environment phpMyAdmin not create a database This option, this is the local installation is not the space how can not this create DATABASE permissions, with the question let's see
Traverse the directory under the file name and show that we will use several functions one is the Opendir directory read function, and then use Readdir to get the directory in the information to the array and then through the while traversal.
Show
This article mainly introduces the use of OpenSSL to implement the RSA asymmetric encryption algorithm example, please refer to the use of it
The code is as follows:
_keypath = $path; }/** * Create the key pair,save the key to $this->_keypath
A simple use of PHP upload image files and then generate a picture of the same scale thumbnail effect, there is a need to learn friends can refer to.
The code is as follows
Copy Code
function _uploadpic ($upfile,
Magento is a set of professional open source PHP e-commerce system. Magento is designed to be flexible, with modular architecture and rich functionality. Easily integrates seamlessly with third-party application systems.
This release of the
When using regular expressions in PHP, there are some differences from other languages, one of which is that PHP has a regular modifier (qualifier).
We encounter modifiers in the learning of PHP regular expressions, so what do we need to note about
A software that has many classes that need to be called between classes and classes, and that once a class has a tightly coupled relationship with another class, the reusability of the software is greatly reduced. Therefore, the reusability of a
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