The program can implement:
1. Upload 5 photos simultaneously
2. Simultaneous generation of two-size thumbnail images
3. Save to MySQL
controllers:upload.php file:
Copy CodeThe code is as follows:
Class Upload extends Controller {function Go () {if
Online There are many CodeIgniter database operation, here to do a summary.
Copy CodeThe code is as follows://query:$query = $this->db_query ("SELECT * from table");==================================Result () returns an array of objects$data =
The Scandir () function returns an array that contains the files and directories in the specified path. As shown below:
Example:
Copy the Code code as follows:
Print_r (Scandir (' test_directory '));?>Output:
Copy the Code code as follows:
Recently webmaster himself is also learning PHP, so some of the small PHP development tips out for everyone to learn.
0. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP will search for variables in a
Occasionally see a paragraph, it seems that there is no problem, it can be fatal backdoor code, where a general phper are not concerned about the anti-apostrophe ', the inverse apostrophe contains the string, equivalent to the Shell_exec
1.
abstract classes in PHP
PHP 5 supports abstract classes and abstract methods. A class that is defined as abstract cannot be instantiated. Any class, if at least one of its methods is declared abstract, then the class must be declared abstract. A
Dispatch is a small PHP framework. It doesn't give you full MVC settings, but you can define URL rules and methods to better organize your application. This is perfect for APIs, simple sites, or prototypes.
Copy CodeThe code is as follows:
Include
Assetic is a PHP resource management framework for merging and compressing CSS/JS resources.
The sample code is as follows:
Copy CodeThe code is as follows:
Use assetic\asset\assetcollection;
Use Assetic\asset\fileasset;
Use
Suddenly I don't want to do anything, it feels like a big uncle. But you can't break the habit of blogging every weekday. So let's have some water today.
PHP used for almost 2 years, but this thing unexpectedly first saw, suddenly, feel that they
the component mechanism of YII
Component mechanism is the essence of the whole system of Yii, before using Yii, it is most important to understand its component mechanism, if you do not understand this mechanism, then reading Yii Source code will
Thinkphp itself has a valid method of generating a static page, which is illustrated in the Manual of Tp2.0, which is not stated in the 3.0 manual, but the 3.0 method still exists. )
$this->buildhtml (' Static file ', ' Static path ', ' template
It is estimated that many children who play smarty template have encountered the problem of cutting garbled characters. Especially the UTF8 encoded.
The following code is saved as modifier.truncate2.php to the plugin directory under Smarty Libs
And
-----------------------------------------------------------------------------------------------
The Data URI scheme is a URI scheme (Uniform Resource Locator mode).
Our well-known site reference resource files are similar to
Detailed Description: http://php.662p.com/thread-275-1-1.html
PHP and JavaJava is a very powerful programming tool, its extension library is also very useful, this tutorial, mainly on how to use PHP to call the powerful Java class Library (classes)
PHP Read the example of the SQLite database, PHP programming to operate the SQLite starter instance.
Original reference: Http://www.jbxue.com/article/php/22383.html
Before using SQLite, make sure that the SQLite and PDO configurations are enabled in
1. Abstract class
A common base class is always defined in the abstract class mechanism, and the specific details are left to the inheritors for implementation. Abstract concepts allow you to create well-scaled schemas in your development projects.
How to send Excel for PHP export as a message
Now the implementation of the click after the download of Excel, and send text messages, how can be combined, the PHP exported Excel as an attachment to send the perfect.
1. Generate Excel:
Header
Small series for everyone to share a beautiful PHP code class. Need friends can come over to the reference!
PHP Verification Code Class code
Width= $width;
$this->height= $height;
$this->counts= $counts;
$this->distrubcode=
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