Netizen "Small Good" gave me a chat room IP, let me go to see. Originally want to invade its server, probably technology not home, engaged for more than 10 minutes, also did not go in. So I just wanted to find out what bugs were in this chat room.
At some point, for example, when installing Statusnet, an error occurs:
Cannot find a database extension. Need at least one of mysqli, Pgsql
This shows that there is no mysqli or pgsql extension in PHP, and here is a description of the MYSQLI
This article describes object-oriented programming in PHP (Oop,object oriented programming). I'll show you how to reduce coding and improve quality by using some OOP concepts and PHP techniques. Good luck!
The concept of object-oriented programming:
We often process data from user input or read from the database, and may have extra blanks or tabs in your string, carriage return, and so on. Storing these extra characters is a bit of a waste of space. If you want to get rid of the string start
In the course of learning "ten days to learn PHP", when you see the problem of database connection, due to the lack of knowledge, encountered difficulties. So find a friend to help write a PHP applet, posted here, hope for everyone can help. I wrote
Header ("CONTENT-TYPE:TEXT/HTML;CHARSET=GBK")//output encoding to avoid Chinese garbled$page =isset ($_get[' page ')? Intval ($_get[' page '): 1; This is to get the value of page in Page=18, if there is no page, then the page number is 1.$num = 10;
Template is actually the separation of PHP and HTML, some people also say MVC what.
PHP handler, save the dynamic content in the variable, and then output the contents of these variables through the template, this is the template
You can
$rows = $db-
Guide:Capital Y represents a four-digit year, while lowercase y represents a two-digit number for the year;Lowercase m represents the number of months (with leading), while lowercase n indicates the number of months without leading.echo Date ('
PHP is the first stop for me to go backwards in this javascripter. " 工欲善其事, its prerequisite ", copied in the JS, Java Experience, the manual, debugging environment, mature code paradigm is learning a new technology 3 of the first conditions. The
This problem has been encountered by the cliff before, too long did not write do not remember (seems to be the CI frame directly related functions), and then met again, rolled to check again, here is not the case is PDO, but with the outdated
When I call the Sina Weibo api today (the sdk downloaded from the official website), I found that the image Weibo was not released successfully. I reported the following error:Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
Js code regular The code is as follows:Copy code 'Si ", // remove javascript In use at first, m indicates multi-row Matching. The test can replace multiple single rows. The code is as follows:Copy code Preg_replace ('//M', '', $ html );
In PHP, a flow control statement consists of a conditional statement and a loop statement. Among them, the flow control statements include if/else and switch statements, and the loop statements include the while and for statements.1. IF statementIn
ReferenceReferencing in PHP means accessing the same variable content with different names. This is not like the pointer of C. Instead, the reference is the alias of the symbol table. Note that in PHP, the variable name and variable content are
Note:Priority :! >&>||> And> xor> orNote: Even though! Higher than =, PHP still allows expressions similar to the following: if (! $ A = foo (). In this example, the output of foo () is assigned to $.Let's take a look at the manual and agree with
With PHP, you can upload files to the server.Create a file upload formIt is very useful to allow users to upload files from forms.See the following HTML form for uploading files: The code is as follows:Copy code Enctype = "multipart/form-data">
The method is described as follows:1. Use the file function to get the template string of the static page, and then use the str_replace function to replace the content to be replaced and then write it into the new file.2. Use the Output Control
Php Tutorial comparison operatorA comparison operation compares two values to reflect the relationship between two numbers.Example name result$ A = $ B is equal to TRUE if $ a is equal to $ B.$ A ===$ B all equal to TRUE, if $ a is equal to $ B, and
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