Before looking at some PHP framework source code, very strange in the file contains, will use DirName (__file__) to patchwork file path, do not know what the benefits, then finally found the reason.
Let's look at a simple example:
There are a,b,c
A lot of friends without foundation, often ask PHP file how to open, in fact, PHP is a web script, but different from HTML XML tag language, can be opened directly through the browser, you need to have PHP running environment to access and open the
We should know that caching mechanism can effectively reduce the Web site's server pressure,Smarty template engine is a big bright spot for us to provide a very simple caching operation, let us learn the following.
First of all, we need to know
PHP Comment Markup @access Use scope: Class,function,var,define,module This tag is used to indicate access rights for keywords: private, public, or proteced br> @author Indicates the author @copyright Use scope:
@access
Scope of Use: Class,function,var,define,module
This tag is used to indicate access rights for keywords: private, public, or proteced
@author
Specify the author
@copyright
Scope of Use: Class,function,var,define,module,use
Specify
"How does the php file open?" ", in fact, we are not required to open the PHP file, most simply because of downloading things, the wrong download to become a Web page file, the main download station in the download connection is actually PHP script
1 Create a new database in MySQL, name it (customizable), create a new table, name News (because it's a press release, take a good name, you can customize it), and then create the names of these fields: ID (auto increment, which is key, type: INT)
1. Need a session file, this of course is used to determine whether the administrator of the PHP file.
2. Need a getip.php file, this is to obtain the routing IP, but also for the administrator to judge.
3. Official start of the core document. In
This article for you to share is the dream system in the first call picture set of multiple pictures in the way, there are the same needs of small partners can refer to.
First find the include/common.inc.php file, put the following code in (I
in Gmail just launched a small but really useful feature in Gmail Labs. The number of unread emails is displayed directly in the dynamic favicon of your browser tab icon. If your browser window lots and lots are open at any time, this may really
This afternoon configuration nginx+php environment, ready to put a WordPress play. But after the layout of the page PHP page has been blank, at first I thought it was a matter of permissions, the right to change to 755 after still not. Then I opened
Today after the installation of Nginx found HTML page can be normal browsing, but the PHP file page Open is a blank look php-fpm log see Nginx Log did not find the problem
Internet search for half a day finally solved, in this make a record memo
PHP output includes the Web page display and pop-up information box content.Garbled generally is the browser to choose the display code and the encoding of the Web page is caused by different, although web surfers can manually select the code to
The biggest advantage of using PHP for
1, code optimization Code optimization not only writes clean and clear code, but simplifies the code somewhat. You can use Zend Optimizer to help complete these miscellaneous tasks. Zend optimizer
As you all know, PHP is a server-side embedded HTML scripting language. But by using embedded HTML as a Web site, the code quickly becomes large and uncontrollable. How can I make PHP code separate from HTML and make a Lib (template) like DW? Makes
This article mainly introduces the Typecho plugin writing tutorial (a): Hello world, this article explains the plug-in file structure, plug-in information, plug-in structure, plug-in flow and so on, the need for friends can refer to the
Recently,
Because the XMLHTTP uses the Unicode code uploads the data, but the General page uses is gb2312, this causes the display page to produce garbled. And when the page is obtained when the XMLHTTP return is UTF-8 encoding, which caused the display
In fact, as long as the implementation of a simple Ajax detection user name, the normal point to be divided into three files. I have a simple point here:
The first one: index. PHP Untitled Document
Username *
There are more than one CSS file in many topics, mainly to accommodate different browsers, because they are somewhat different in interpreting CSS.
But have you ever thought of using a CSS style sheet for a single page?
First open the header.php
When executing a. php file under the PHP command line, the working directory of the Execution Environment (GETCWD ()) is the directory of the PHP Command Program (php.exe), so if you want to use a relative path within the file, switch the current
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