The entire thinkphp framework has two cores, one, MVC pattern; two, slice programming
Reply to discussion (solution)
Thinkphp is a hodgepodge that can generate various applications that are currently popularBeginners will typically only use
Document the problems and workarounds that are encountered in the project.
1. Display Chinese
In the PHP page display, we usually need to add the following code at the beginning to allow our page to display the correct Chinese:
Yes, let
For example I want to introduce other people's classes, where these files are put, how to write thinkphp to introduce third-party class syntax
Reply to discussion (solution)
Put it under the lib/org.Like a.class.php put under Lib/org/util.Then
PHP connection MySQL I have already written the article, this article is mainly about the query from the MySQL results after the output of the problem.
One: Mysqli_fetch_row ();
Query Result: Array ([0]=> Xiao Wang)
Inquire:
while ($row =
When we upload attachments, we often upload some attachments with the name of the attachment, the upload is successful, you will find that the uploaded attachment is actually an empty file. I've come across this kind of problem.
Let's solve this
1. Use list to achieve a specific segment value after getting explode:
2, pay attention to = =, switch, In_array of the pine comparison (loose comparision) For example, in the example below, if the $name value is 0, then it will satisfy any
This article and "Servlet" javaweb to get any parameters (click the Open link) for the sister article,
How do you do this if you sometimes need to pass a variable parameter between PHP pages through the Get method?
For example, the following
Web site Construction, will usually use the site address URL redirection, this advantage is conducive to your site SEO optimization, that is, to make your site pseudo-static, the following is a brief introduction to the implementation of the two
Learning Cocos2d-x Network programming is a very embarrassing problem, because the familiar cocos2d-x learners basic in the game development a piece belongs to the client programming, want to self-study network programming necessary involved to the
See the figure in the way an array to define constants, always feel so much trouble ah, why not directly write a constant, such as
Define (' Attach_malbum ', ' shop/member ');
How good is that?
The whole array of trouble, incredibly.
Even more
The design basis of PSR-0 specification
1. Use all namespaces
2. All PHP files must be loaded automatically, cannot have Include/require
Spl_autoload_register
3. Single entry mode
1. Three basic design Patterns
Factory mode
To replace a new
Ob_start (); require ' xxx.php '; $temp = Ob_get_contents (); Ob_end_clean (); $fp = fopen ($path, ' W '); fwrite ($fp, $temp); Fclose ($FP);
I'm now going to generate 10,000 data, loop through the code above, but prompt for memory out of the way,
Well, the environment is also set up the tools also have that we began to write PHP program, the last section we said the site of our local directory for d:/phpwww, you create a new testphp directory inside, the name casually up, it indicates this
When I generated the HTML file, due to the large amount of data, countless times fopen fwrite fclose, the file has not been generated, the memory exceeded.
My HTML is generated by reading the cache, then writing the file
Ob_start (); $temp =
You know that almost all of the PHP video lectures, including books, there is no mention of the concept of hooks, but found that the actual project is often used, so sometimes feel that the practice of teaching the disconnection has been the biggest
Randomly select a line in the 1.2.3.4 text and then combine it into one sentence, such as:
What to do, to eat, that's great, huh?
Or
Good, full, what to do, happy
Reply to discussion (solution)
$filenames =array (' 1.txt ', ' 2.txt ', '
Database environment: Redhat as5+mysql5.0.4 UTF8 encoding
Web environment: Win2003 nginx1.5 php5.2.17 page when UTF8 encoded.
Other Description: An application (purchased) using the mysql5.0.4 database, I now write a Web site in PHP to display a
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