Parse common instructions for using PHPExcel and the introduction of integrating PHPExcel into the CI framework. Write and generate an excel file: Copy the code as follows: export dephpexcel. php; export dephpexcelwriterexcel2007.php; or export
To split the string "1, 2, & #039; 3, 4 & #039;, 5", the result is [& #039; 1 & #039 ;, & #039; 2 & #039;, '','', '3, 4', & #039; 5 & #039;] ask me how to write a regular expression that I implemented using regular expressions. php code: {code ...}
The so-called curd. That is, four basic operations on database operations (curd): c:create (Create), u:update (update), R:read (read), and D:detele (delete).
In thinkphp, it is not certain to use the methods of these names, here are the common:
{Code...} sorts $ test according to publish_time. how can this problem be solved? Ask!
$test=array(60) { [0]=> object(stdClass)#14 (3) { ["id"]=> string(3) "609" ["title"]=> string(19) "Physical Mechanisms" ["publish_time"]=> string(10) "6 MAY 2016"
Write and build operations for Excel:
Copy CodeThe code is as follows:
Include ' phpexcel.php ';
Include ' phpexcel/writer/excel2007.php ';
Or include ' phpexcel/writer/excel5.php '; For the output. xls
Include ' phpexcel/iofactory.php ';//phpexcel
The values in the PHP array cannot be obtained .. After the form is submitted using POST: var_dump ($ _ POST); the output value of the POST array can be seen: array (10) {[& quot; picName & quot;] = & gt; array (2) {[0] = & gt; the values in the
In this lesson, we will learn the attributes of arrays, the usage of foreach, And the staggered array I mentioned in the previous lesson, I will explain the differences between the staggered array definition and the rule two-dimensional array
I bet when you see the word base64, you will think where you have seen it, because you can see this article online.
Article You have already used it in the background. If you know something about the binary number, you can start to read it.
The so-called CURD. That is, four basic operations (CURD) for database operations: C: create (create), U: update (update), R: read (read), and D: detele (delete ). ThinkPHP does not necessarily use these names. Here we list the common methods:
A MESG table was originally in the local database, and a field maid was later added to the table.
Use in an operation
$MESG = D (' MESG ');
Dump ($MESG);
In the model are:
Protected $_map = Array (
' User ' = ' muser ',
' Content ' = ' mcontent ',
Import Java.util.Scanner;public class GradeManage1 {Information: User name, password, student name, school number, score. Each array (the array of each information is labeled the same)/*** users--user name passwords--password names--name
I bet when you see base64, you will think where you have seen it, because you have already used it in the background when you can see this article online. If you know something about the binary number, you can start to read it.
Open an email to view
ThinkphpSAE database operation D method problems the local database originally had a mesg table, and then added a field maid after the table.
Use
$ Mesg = D ('mesg ');
Dump ($ mesg );
The models include:
Protected $ _ map = array (
'User' =>
thinkphp/sae/Database operation/d method problem
A MESG table was originally in the local database, and a field maid was later added to the table.
Use in an operation
$MESG = D (' MESG ');
Dump ($MESG);
In the model are:
Protected $_map = Array (
'
The values inside the PHP array cannot be taken out.
After submitting the form with post:
Var_dump ($_post);
The value of the output post array can be seen:
Array (Ten) {["Picname"]=> Array (2) {[0]=> string ("P_large_18sq_6bcc000198902d14.jpg" [1]=>
What is base64?
According to rfc2045, base64 is defined as base64 content Transfer Encoding. It is designed to describe the 8-bit bytes of any sequence as a form that is not easily recognized by people. (The base64 content-transfer-encoding is
Convert an array to an object with Stdclass
PHP code
The code is as follows
Copy Code
$arr = Array ();$arr [' a '] = 1;$arr [' b '] = 2;$arr [' c '] = 3; $arr = Array ();$arr [' a '] = 1;$arr [' b '] = 2;$arr [' c '] = 3
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.