I found that I have enough languages and development platforms ..C-> VBScript-> C ++-> C #-> C ++-> ruby-> PHP
This post has accumulated some PHP knowledge.
First, the basic output:1 echo (): This is not a function. It is a PHP statement that
Many virtual hosts do not support url_rewrite. Yesterday, a classic friend wrote a feeling.
CodeToo many. I have nothing to do with _ server. In fact, it can be very simplified to take xxx/test. php/article.123456.html for details. This format is
A colleague made a system written in PHP. Although it is multi-language, it does not contain Chinese! He planned to manually translate more than 2000 language configurations. I really admire it. I thought about it and I should have a good practice!
After reading the source code of hook. php, we can see how CI uses hook for extension.
Hook basic knowledge http://codeigniter.org.cn/user_guide/general/hooks.html
The use of the hook in CI goes through the process of enabling the hook, defining
Read CiCodeIt is found that the processing URI is not processed according to the PHP runtime environment.
How can we determine the PHP runtime environment?
We usually run our PHP under Apache.ProgramOf course, some people use the IIS EnvironmentIf
To find a good template engine, I searched on the Internet and have sorted out the following lists:
SmartySmarty is characterized by compiling templates into PHP scripts and then executing these scripts. Fast and flexible.
Heyes template classA
1. In a function, it is more efficient to use return when passing an array than to use global. For example:
Function userloginfo ($ usertemp ){$ Detail = explode ("|", $ usertemp );Return $ detail;}$ Login = userloginfo ($ userdb );
Ratio
I. How does PHP read files?
PHP can read files from the current server or remote server. The steps are: open the file, read the file, and close the file.
1. How to open a file in PHP
Use PHPFunction fopen ()Open a file. fopen () generally
Use PHP to obtain the Client IP address.CodeAs follows: $ IIPP = $ _ server ["remote_addr"];Echo $ IIPP;?> //////////////////////////////////////// /////// $ User_ip = ($ _ server ["http_via"])? $ _ Server ["http_x_forwarded_for"]: $ _ server
First, let me give an example:A simpleArticleDisplay SystemIn simple cases, we assume that the article system is read-only. That is to say, this example will not involve the publishing of the Article. Now it is started.Since it only involves reading
You do not have to strictly abide by these principles and violate them and are not subject to religious penalties. However, you should regard these principles as warning bells. If you violate one of them, the warning bells will ring. -- Arthur J.
1. If a method can be static, declare it static. Speed improvement is by a factor of 4. If a method can be static, make a static Declaration on it. The speed can be increased to 4 times.
2. Echo is faster than print. Echo is faster than print.
3.
PHP Interface Myusbkou{ Function Type (); // Type Function Action (); // Executed operation } Class Zip Implements Myusbkou{ // Inheritance Interface Function Type (){ Echo " USB 2.0 interface " ;} Function
Recently, Chinese garbled characters have emerged when PHP is used as an Ajax function. on the internet search on, a lot of is said but tried can not, my page code is UTF-8, MySQL is also UTF-8. previously in. net also encountered such a problem,
Magic Functions1. _ Construct ()Called when instantiating an object,When _ construct and a function with the class name both exist, __construct will be called and the other will not be called.
2. _ Destruct ()
It is called when an object or
What will happen if you use a large mirror as a surf board? Maybe you will conquer the waves in a short period of time, but you must understand from the bottom of your heart that this is not the right choice for surfing. The same principle applies
Frequently Used PHP to take the entire function, mainly including ceil, floor, round, intval
Ceil -- integer in a single methodDescriptionFloat ceil (float value)Returns the next integer of no less than value. If the value has a decimal part, it is
Compile a Myimport. php file to display the name, gender, and age. If a link is not from this website, you will be redirected to the error prompt page. "You cannot access this page .... "
1. check. php file
View information
2. Myimport. php file
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