1. Demand Analysis
Start a new discussion topic by posting an article
Post an article to reply to an existing article
View published articles
View conversation topics in the Forum
View the relationship between articles, that is,
First, introduce
Today is the introduction of MB_SUBSTR () and Mb_cutstr (). PHP programming, whether it is a Web site, or platform development, a lot of time to use the interception of strings. Before use, to modify the php.ini configuration file,
Background:
As a result of the specific work, I made a paper questionnaire, the main content of the questionnaire is to allow users to 10 requirements (numbered A, b ...). ) to prioritize, so I get a good hundreds of copies similar to A>i>h>g>d ....
Finally in the case of php5.5 to generate the apc.so extension file, I can't wait to test the APC, with the apc.so file, let PHP support APC easy, open the configuration file in use PHP.ini, only need to add extension= apc.so, restart the Web server
with the version of the different curl in PHP to try also become different, for curl data, everyone is also confused, indeed about curl, online or can find some usage, but there is no explanation, today, I will find the information I have to share
In the series article 1 and series article 2 articles, the installation of vagrant and the automatic installation of the development environment software are described.
This article will write about the configuration of Nginx in the virtual machine
PHP gets methods for constants, attributes, and method lists in a class
$r = new Reflectionclass ($this); Zend_debug::d UMP ($r->getconstants (), "Constants"); Zend_debug::d UMP ($r->getproperties (), "Properties"); Zend_debug::d UMP
In order for the different view to be displayed in the same layout, we can write the layout template file and save it as layout.phtml name, and specify the location of the file in index.php.
require_once' zend/layout.php ';
Using PHP for Web development, the use of forms (form) is ubiquitous, and its properties action and method allow you to specify the URL to which the form's content is to be sent and how to send the form data to the server. In most cases we specify
(1) mysql_real_escape_string– escaped in the string used in the SQL statement
Special Characters, taking into account the current character set of the connection
Here's how to use it:
$sql = "selectcount(*) as ctr from users where username
Basic syntax
Mark
Start tag:
结束标记:?>php会解析二者之间的代码。如果是纯php代码,最少删除结束标记,防止意外输出。
从HTML中分离
当php解释器遇到?>时就原样输出后面的内容。
条件语句的高级分离术
条件语句是一个例外,php解释器会判断输出哪些,跳过哪些。当条件未达成时会直接跳过该段条件语句块。
if ( $expression == true ): ?> This will show if the
PHP Common Functions Summary string interception:1, substr (' string to intercept ', ' starting from the first few characters ', ' to the end of the first few characters '); * Capture English or digital 2, $cut = Explode (' to intercept a
Step 1: Query the Nginx main process number
Ps-ef | grep nginxFind the master process in the list of processes, whose number is the main process number.
Step 2: Stop Nginx
Calmly stop Nginx:Kill-quit Main process NumberQuick Stop Nginx:Kill-term
In an application, you might use a code base for a document, however, we often add new features that require different ways to use the existing
Object。 Maybe the new feature just needs a different name, or it may be that the new feature needs to be
Calling the Laravel command or method from a server timer task
1. What to do when creating a scheduled task under App\console\commands
Create command: PHP artisan make:console Test
$signature = "Testcommand"; Here the signature, in the kernel.php
End () function:
The end () function points the pointer inside the array to the last element, if successful and returns the value of the element;
For example:
$peoplearray("Peter""Joe""Glenn""Cleveland");echo end($people);
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