For developers who are already familiar with Apache+php+mysql installation configurations, or those who do not want to involve development but just want to build PHP applications, it is convenient to use the Apache/php/mysql installation suite to
First look at the parameters of Chinese description
--prefix=/usr/local/php PHP installation directory--with-apxs2=/usr/local/apache/bin/apxs--with-config-file-path=/usr/local/php/etc Specify php.ini Location--with-mysql=/usr/local/mysql MySQL
Variable relatedInternal implementation of PHP variablesthe system type of the programming language is divided into strong type and weak type two kinds:
A strongly typed language is one in which a variable is declared as a variable of a type,
This article describes a simple PHP implementation of the press release system. Share to everyone for your reference. Specifically as follows:
I small white, has been in the company with templates and framework to write PHP, found that sometimes
This article illustrates how PHP implements a method of passing arrays to JavaScript. Share to everyone for your reference. Specifically as follows:
Here is the introduction of PHP to the array of values to the JavaScript technique, this method
There are many ways to get the error log in PHP, below I give you a brief introduction of how to solve such problems, the following through the code to show you, hope to help everyone.
';
Print_r ($earr);
return array ();
}
For PHP
So, what makes PHP so popular? PHP is so popular because it's easier to learn than any other language, and there's a whole bunch of pretty good php tutorials on the web that will allow you to quickly get to the development of web-based programs.
There are a lot of complaints about PHP, and even these complaints come from a lot of smart people. When Jeff Atwood wrote another article about PHP, I thought about the good aspects of PHP.
The biggest problem with these complaints is that they
Public publicly owned: This class, subclasses, and external objects can all be calledProtected protected: This class subclass, which can be executed, cannot be invoked by external objectsPrivate: Only this class can be executed, subclasses and
This example describes the final keyword usage in PHP. Share to everyone for your reference, specific as follows:
The final keyword can only be used to define classes and define methods.
Classes marked with the final keyword cannot be inherited
The example in this article summarizes the common PHP string function. Share to everyone for your reference, specific as follows:
Nl2br
Function: Change line character to
RTrim
Function: Clear the blank on the right
Package download
pain.php
Copy Code code as follows:
Class Pain
{
Public $var =array ();
Public $tpl =array ();
This is the assign VARs to the template
Public function assign ($variable, $value =null)
{
$this->var[$variable]=
Modify the template file, such as article_article.htm, and add the following code where you want to add tag:
Copy Code code as follows:
{dede:field name= ' keywords ' " runphp= ' yes ' }
if (!empty (@me)) {
PHP Object Instantiation Singleton method, php object instance
How to instantiate an object Singleton in PHP:
Three private and one public: two private methods, one private property, and one public Method
Private function _ construct () {}// the
Description of the truncation string function of the ThinkPHP template substr, thinkphpsubstr
Truncate string function of the ThinkPHP template substr
Add the following code to Common/function. php:
/*** Intercept a Chinese string **/function
Example of generating image thumbnails using PHP,
This example describes how to generate image thumbnails in PHP. We will share this with you for your reference. The details are as follows:
Class App_image_helper {protected $ imgFileName; protected $
The first three articles have briefly explained and demonstrated the structure and principles of MVC... Of course, it doesn't mean that a framework has only one thing. A good framework requires a wide range of functions, such as friendly error
Let's talk about view and view today... Before you understand it, you may think that the template engine is amazing. After you understand it, you will think that it is so simple...For the template engine, the general principle is to replace the
1. Use functions of the php gd library to draw a 3D sector statistical chart The code is as follows:Copy code Header ("content-type", "text/html; charset = utf-8 ");/* Sector statistical chart */$ Image = imagecreatetruecolor (100,100);/*
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