When the form has to submit an array to the database, such as to add some customer service QQ information, Laravel will throw the input field can not be an array of errors, the solution is also very simple.Add more QQ customer service needs to use
As a PHP programmer, especially novice, for the internet's sinister always know too little, for external intrusion There are many times is the amateur hands, they do not know how the hacker intrusion, submit intrusion, upload vulnerability, SQL
"Php100 exclusive feature" PHP's ability to handle strings is very powerful, and there are a variety of ways, but sometimes you need to choose the simplest and most desirable solution. This article lists 10 common string processing cases in PHP, and
Reply content:Black
gb18030:fc5c
Utf-8:e9 BB 92
Utf-16:9ed2
You know what 5C means in ASCII? Special symbols ' \ '!
In the C-language printf function, \ is an escape character, and a PHP bug causes the string to be truncated because it
Copy CodeThe code is as follows:
Date_default_timezone_set ("etc/gmt-8");
$tm =time ();
echo Date ("Y-m-d h:i a", $TM);
echo "
";
echo Date ("Y year M D Day", $TM);
?>
PHP default time zone UTC time zone, and Beijing is located in this time zone
Workaround: $str = "QB". Str_pad (($maxid [0]["Max (ID)"]+1), 5, "0″,str_pad_left");
where $maxid[0]["max (ID)"]+1) is using the Max function to find a value from the database with the largest ID, the ID is the primary key, and is not
Whenever a qualified
PHPProgrammers, you should know
unserializeAnd
Autoload, but I am afraid that there is not much to be said about the relationship between them.
For example, suppose we can get the serialized data of a third party, but there is
A variable cannot be passed between the "1" page get,post,session in the latest PHP version, the auto global variable is closed, so the variable to be submitted from the previous page is to use the $_get[' foo '],$_post[' foo '],$_session[' Foo ']
Copy CodeThe code is as follows:
The first form of a notation
$da = Date ("W");
if ($da = = "1") {
echo "Today is Monday";
}else if ($da = = "2") {
echo "Today is Tuesday";
}else if ($da = = "3") {
echo "Today is Wednesday";
}else if ($da = = "4") {
A variable cannot be passed between the "1" page get,post,session in the latest PHP version, the auto global variable is closed, so the variable to be submitted from the previous page is to use the $_get[' foo '],$_post[' foo '],$_session[' Foo ']
operation of files and directories
PHP is very handy for processing files and directories on the local server, but sometimes permissions and path-related issues can occur1. Open FileResource fopen (string filename, string mode [, bool Use_include_
Create a new PHP document: The name is good to remember, such as: shortcut.
PHP
Content in the PHP documentation:
Code
$Shortcut = "[Internetshortcut]
url=http://www.hake.cc/
idlist=
[{000214a0-0000-0000-c000-000000000046}]
prop3=19,2
";
Header ("
Programmers know that the General tab is implemented by JavaScript, and the benefits of JavaScript are powerful and flexible. However, there are special cases where we can use CSS to implement tab if we just need a simple content switch. So how does
What is FPDF?
FPDF is a PHP class which allows to generate PDF files with pure PHP, which is to say without using the Pdflib library. The advantage is this pdflib requires a fee for a commercial usage. F from FPDF stands for free:you could use it
The release contains more than 90 new features, enhancements and bug fixes, most importantly: RESTful URL support, query caching, class-based actions parameter binding, seamless client validation, passing parameters to the relational naming scope,
The following PHP code resolves the following issues:
1.json_encode UTF8 code after the Chinese string is not readable
The problem of Chinese garbled characters in 2.json_encode multi-series Group
3.json_encode array contains a newline error problem
When we often have to deal with things like manual code testing and deploying such tedious and repetitive work, we tend to feel frustrated, but we always try to be efficient. This article will introduce you to 10 PHP development tools that can help
1. Common methods for linking databases: conn.php
Copy CodeThe code is as follows:
First step: Link the database
$conn = @mysql_connect ("localhost:3306", "root", "root") or Die ("MySQL link failed");
Step Two: Select the specified database, set
Background: After you install Redis, you need to install the Phpredis extension to allow PHP to operate Redis; this machine has multiple PHP versions, the installation process encountered in the pit share.A moment to downloadgit downloads the Redis
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