test Environment
lyolzj@localhost/usr/local/src/zendopcache-7.0.5 $ lscpu
architecture:i686
CPU Op-mode (s): 32-bit, 64-bit
Byte Order:little Endian
CPU (s): 4
On-line CPU (s) list:0-3
Thread (s) per Core:2
Core (s) per Socket:2
Socket
Var_dump (Strtotime (' 1441185010 '));//output bool (FALSE) Var_dump (Strtotime (' 1451382400 '));//output int (13591003898)
It's strange, why are the two results different?
Reply to discussion (solution)
I PHP5.6 return two false, what
Maybe we seldom use this piece of knowledge in our daily work, but I still like to find out the unknown knowledge.
class method rewrite rules for PHP
1. The final modified class method cannot be overridden by a quilt class even if the final
Laravel5 Implementing a user-friendly error page is very simple, for example, to return to status 404, just add a 404.blade.php file to the view/errors. This convenience is not implemented by default in lumen, so add one yourself.
Lumen how to
Let's review the common regular expression functions commonly used in PHP.
1. Preg_match () and Preg_match_all ()
int Prag_match ($pattern, $subject, optional parameter $matchs); Only one match is made, the return value 0 or 1, that is, the
Sociallogin is a simple and easy-to-use cross-frame third-party landing library, focused and committed to solve the problem of third-party landing, no longer see the official manual, a service provider to access the landing services, now only need
Image: http://stackphp.com/
As shown, the green area of the center is the core area of the entire application.
So, middleware is a series of ways to handle requests and responses rather than part of your program logic.
Middleware is used by
Made a PHP-controlled cache of its own, relying on etag and file caching to handle
If the browser sends an etag, compare the ETag, send 304,etag inconsistencies directly, and if there is a file cache, read the file cache directly and send the
Specific operation:
1. Preparatory work
In order to avoid the occurrence of program conflicts, it is recommended to first uninstall the RPM-installed PHP and related dependencies (if any).
2. Installing the Extensions Tool Library
In real
In the PHP Web site, there are many needs to achieve the paging effect, mainly for reading novels.
Features are implemented as follows:
When you use SQL queries for paging, you need to call several functions, specifically the
Include ' model.php ', include ' user.php ', class Caiji extends model{public function hi ($name) { echo "$name to you say hi \ n "; User::say (' Jack '); The non-static class is called here. User::hello (' Kate ');//You can call static
MySQL Database
Have database A and database B, while operating a two tables and B in two tables, support things rollback, are innodb.
In two different cases
A library and B library on the same server
A library and B library are not on the same
litphp Introduction
Litphp is a lightweight PHP development framework, based on the MVC architecture, built with Php+apache+smarty combination. Its feature is to encapsulate as many common functions as possible, while avoiding adding miscellaneous
In my simpla, using the infinite classification, the use of PHP's reference ideas to achieve an infinite classification method, you can perfectly display a similar classification pattern.
The specific implementation code is as follows: if there
PHP How to customize exception classes, catch exceptions and throw exceptions.
Or give a reference to an example.
Reply to discussion (solution)
try { throw new Exception ($error), } catch (Exception $e) { echo
PDO common methods:
1. Pdo::query () is mainly used for operations (Pdostatement) that have recorded results returned, especially select operations.
2, Pdo::exec () is mainly for operations that have no result set returned. such as Insert,update
Overview: Recently learning PHP programming, System for Mac OS X 10.11, using Mamp PRO (3.1) Integrated environment
Problem: in Mamp folder htdocs into the simple echo PHP code can be displayed, but unable to connect to the database, as
I don't know why, the code in the controller is written, but there's an error when I call through index
dbController.class.php File Code:
Class dbcontroller{
function Connect () {
$db = new Dbmodel ();
$db->get ();
}
}
?>
index.php File Code:
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