There are several ways to use the session
1. Cookies based
2. Based on the URL of the SID string
3. stored in the database
4. Stored in the memcache (the most efficient)
session_name:". Session_name (); If a cookie is turned on, it can be found in
Learn PHP, encounter such a problem class mypc{static public $name = "My Computer"; Function Show () {echo $this->name. " Powering on ... "; }} normally: $p = new MyPC (); $p->show (); This is no problem, but it can also be called to Show Method
Immediately began to participate in the work, but also began to learn PHP!
1. Download Addresshttp://windows.php.net/download/
2. PHP Large versionPHP4: Too old, poor OO support has been largely eliminated. PHP5: A version of the--php5.2,
a file function library
1, the ReadFile () function reads the file and writes it to the cache.
Create a new 01.txt, write something
PHP ReadFile
Create a PHP file
2, fopen open the file
The first parameter of the fopen () function
Cardinal ranking in the "Big talk data structure" did not talk about, but in order to gather eight sorting algorithm, I learned this sort algorithm through the network, and to share it out. Basic idea:
The cardinality sort (radix sort) is an
In spring's configuration, these two tags are used. So what's the difference?
/Slice code when using configuration, if the slice code is automatically injected to be An, then ref attributes directly to the bean injected name on it! Ect>
Today, when you are learning unit tests in the YII framework, the following error always occurs when you run the PHPUnit unit/dbtest.php command.PHP notice:please no longer include "phpunit/framework.php". In/usr/share/php/phpunit/framework.php on
The scheduled Task (Schedule Task) is a program similar to cron on the Windows platform, and of course the functionality is much worse.
Manual operation is impractical because you need to run a PHP program every hour.
First in the CMD test, for
In ASP, the multiple-select Drop-down list has been processed into an array, such as:
newsproductuserPress CTRL to select the news and product options, click the Submit button, and use Request ("Sltype") to return the Sltype value and get
The recent BI project has been rebuilt, the original data is through the PHP loop analysis of data, change, want to use an iterator. Here I will summarize the PHP iterator
Iterators are sometimes called cursors (cursor) software design patterns that
About Linux environment Nginx installation and debugging and PHP installation reference this article can be: http://blog.csdn.net/unix21/article/details/8544922
Linux version: 64-bit CentOS 6.4
Nginx Version: nginx1.8.0
PHP Version: php5.5.28 &
Note: $pattren Regular expression$subject Matching Target data
Note: (1) Pre_match matches only once, and Pre_match_all matches all (2) The former is a one-dimensional array, while the latter is a two-dimensional array (3) function return value
Configuration database file: config/databases.yml
Schema file: config/doctrine/schema.yml
1. Generate schema files from the specified database:
$ php symfony Doctrine:build-schema
2. Generate model class According to schema file:
$ php symfony
Class inheritance in PHP is one of the most commonly used programming features, we can create a base class (the parent Class) and then define some basic methods in this, in our subclasses we can extend the methods in the parent class this is called
PHP has a very simple garbage collector that will actually garbage collect objects that are no longer in the memory range (scope). The internal way of garbage collection is to use a reference counter, so when the counter reaches 0 o'clock (meaning
These days in the process of doing a project, just need to use the CLI in thinkphp to run a controller in the method, in the official manual to find, found, do not know how to use:
Confused, has been Baidu TP5 how to use the CLI implementation
1, Intval & (int) can not be converted to Object.
2, conversion efficiency (int) > Intval () > sprintf (Intval is the built-in method of PHP, relatively low efficiency).
3, the other exactly the same.
4, input 0123, the 0x123 (int) function will
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