PHP generates random strings
You can specify whether it is a pure number or a pure letter or a mixture.
You can specify the length of the.
Copy CodeThe code is as follows:
function Rand_zifu ($what, $number) {
$string = ";
for ($i = 1; $i
But now this article may contain some expressions, we certainly can not directly extract src Road strength, so if the first is an expression picture, will extract the expression image as the cover, this time we need to write clear regular to exclude
As described in the Yii documentation, the general process in which yii processes the form is:
In just a small project, want to use AJAX to submit form information and verify the save, do not want to use the hidden iframe to do no-refresh commit,
The role of the session is many, the most used is the site within the variable transfer of the page. At the beginning of the page we want to session_start (); open session;
Then you can use the SESSION variable, for example to assign a value is:
See here I want to write a HelloWorld program, but this time the program needs to invoke the HTM to implement, first we know that Fatfree mainly PHP as the engine, we define a template.htm file:
Hello,
!Note that the name here is a
In PHP, arrays are divided into two categories: numeric indexed arrays and associative arrays. Where the numeric index array is the same as the array in the C language, the subscript is for 0,1,2 ... Associative array subscripts may be of any type,
When using the Kindeditor editor, use JS click submit Form PHP cannot get the corresponding editor content
The code you need to add is:
Kindeditor.ready (function (K) {editor = k.create (' #editor ', {resizetype:0,allowimageremote:false,width: '
In PHP, it is common to add elements like arrays to the Array_push function, which is the stack operation of the array, but the function is to add elements to the end of the array, if you need to press the array elements into the array's head (that
Use CodeIgniter (CI) to do the site's friends should be found that any URL of the site by default will bring a index.php, this from the perspective of SEO, the impact on the site is not small, but the URL of the beautiful, this is very uncomfortable,
In PHPCMS2008, each column can be assigned to different roles of different permissions, is based on the column as the starting point, and our general situation from the role of the starting point is not right, so it does not go to achieve the
You can determine whether it is one-dimensional, two-dimensional, or several-dimensional arrays:
function Getmaxdim ($arr) {
if (!is_array ($arr)) {
return 0;
}else{
$dimension = 0;
foreach ($arr as $item 1)
{
$t 1= $this->getmaxdim ($item 1);
if ($
PHP in the array to find the value of the existence of a number of methods there are many, I remember a long time ago I have been silly with the Foreach loop to find, below I mainly share the PHP built-in three array functions to find whether the
Compared to DOM or Expat parsers, SimpleXML can read text data from elements in just a few lines of code.
SimpleXML can convert XML documents to objects , such as:
Element-is converted to a single attribute of the SimpleXMLElement object. When
If you still want to get the size information of the Flash file by parsing the SWF file header information, it's a bit far away. Since PHP 4 has built-in getimagesize functions to do this. Its function measures the size of any
thinkphp printing the last SQL statement is a very common use, in the process of debugging code is often used, because the memory is not very good, in this note, convenient for later use.
The following is also a sample record
$form =m (' user '),
The first way
Copy CodeThe code is as follows:
$date = Date ("y-m-d", Strtotime ("2011-12-12"));
The second way
Copy CodeThe code is as follows:
$date = "2011-12-12";
$year = ((int) substr ($date, 0,4));//year acquired
$month = ((int) substr
Use the Array_rand () function to randomly select one or more elements from an array and return.
Copy CodeThe code is as follows:
Array_rand (Array,number)
Parameter description
Array required. Specifies the input array parameters.
Number is
In the Baidu Encyclopedia, the definition of Stdclass is as follows:
Copy CodeThe code is as follows:
Stdclass began to be popular in PHP5. And Stdclass is also a reserved class for Zend. Stdclass is a base class for PHP,
Almost all classes inherit
PHP Imperial cms file directory naming is very weird, took over a modification of the Imperial CMS, found a half-day did not find the configuration file where, really ashamed, search, share out with the same can not find the profile of friends
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