# # 1.
Let's start with a php5.3+ grammar sugar, which we usually write about:
$a = 0;
$b = $a? $a: 1;
Syntax sugar can be written like this:
$a = 0;
$b = $a?: 1;
Execution results $b = 1, the latter is more concise, but usually not too much
In GoDaddy bought a server, in the configuration of user information when the other user name and password, did not fill in the name of the root username, now want to switch to the root account, how to deal with, please Daniel pointing!
Reply
I. Basic role of htaccess
. htaccess is a plain text file that contains instructions related to Apache server configuration.The main functions of the. htaccess are URL rewriting, custom error pages, MIME type configuration, and access control.
Automatically assign a customer service for each new member registered
Customer service A total of 3 (will add more customer service later) How to deal with?First new member, customer service 1Second new member, customer service 2Third new member,
I am learning Laravel found that Laravel is directly using the model query database data returned, that is not to say: Laravel do not need DAO and service layer, only need a model on it?
Reply content:
I am learning Laravel found that Laravel
Because the user record is too much (3 million), the paging query becomes very slow, how to optimize the statement or index? Do you have any optimization plan?
Supplemental content:Thank you for your proposal, I see very inspired, but the
$obj= NewClass_guest_info;$obj -Getlang(); //get the language of your visitors: Simplified Chinese, Traditional Chinese,中文版.$obj -Getbrowser(); //Get the Guest browser:MSIE,Firefox,Chrome,Safari,Opera, Other.$obj -Getos(); //Get guest operating
Reprint Original Address: http://blog.csdn.net/lgg201/article/details/6127564
functioncallback($callback) {$callback();}//output: This is a anonymous function./n//Here is a direct definition of an anonymous function to pass, which is not
Preface:
What is YII?
Yii is a high-performance, component-based PHP framework for rapid development of modern WEB applications. The name Yii (read as ' Easy ') has the dual meaning of "extreme simplicity and constant evolution" in Chinese, also
In this paper, we describe the clue of PHP implementation two fork tree and binary tree traversal method. Share to everyone for your reference, as follows:
createthreadtree (); echo $tree->threadlist (). "\ n"; traverse the lead from the first
?? Absrtact: In the trace Yii Framework source code, encountered __set () Magic method of use, some doubts, so write a demo to test, sure enough to find the mystery, collation as follows.
1. First look at the book on the Magic Method __set () is
PHP has a number of special functions and methods,
these functions and methods compared to the ordinary method of the special point is that the user code is usually not active invocation, but at a specific time will be automatically called by PHP .
The last year to work has been relatively busy, there is no serious update blog, I do not live with you small partners. Today is not the technology to share, but about me and my little partner engaged in two months out of the app local business,
Let's talk about how SQL injection attacks are implemented and how to prevent them.
See this example:
Copy the Code code as follows:
supposed input$name = "Ilia"; DELETE from users; ";mysql_query ("SELECT * from users WHERE name= ' {$name} '");
It
80,250,430,134,35,60,233,90,263,225,120,59,151,677,340,221,550,300,229,97,230,123,133,87 There are 24 numbers, one can't be less. You can modify the function to judge
Copy the Code code as follows:
/*24-Hour Bar chartAuthor:
;;;;;;;;;;;;
;; grammar;;
; The syntax of the file is very simple. whitespace characters and lines beginning with semicolons are simply ignored.
; Chapter headings (For example: [PHP]) are also simply ignored, even though they may have some meaning
http://php-accelerator.co.uk/can be downloaded and is a powerful opponent of Zend. is free of charge. I'm already using it. The effect is good.
Modify PHP.ini Plus:
Zend_extension =/usr/local/lib/php_accelerator_1.3.3r2.so
PHPA = On
Phpa.tweaks = On
Chatmain.php3
As follows:
php+access Chat Room
"The copyright of this article is owned by the author and house Orso near net, if need to reprint, please specify the author and source"
The above
Answers to common depressing questions in PHP
Turn from Joy Village
Register_global defaults to off in later versions of PHP4.2
To get a variable submitted from another page:
Method One: Find the Register_global in php.ini and set it to on.
Method
Really bored, whim, want to put the PHP inside part already provide encapsulated function re-use PHP implementation again,
So the following code is mainly implemented in PHP part of the string processing function, while the implementation of some
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