Regular PHP
if (Preg_match ("^[a-za-z][a-za-z0-9_\-]{5,19}$", "abc-mmm"))
echo "true";
else echo "false";
?>
Want to verify the regular expression of the account, the beginning of the letter, allow numbers, letters, underscores, minus, 6-20
$str =
The theory
My Myselef
Your Yourselef
STR;
$reg = '/^ ([a-za-z]+) \s*\1[a-za-z]*$/m ';
Preg_match_all ($reg, $str, $result);
Var_dump ($result);
?>
Here is the result of the match, I don't quite understand why only the last one is matched
Utf-8 GBK
$str = "BLACK";This string I checked with the mb_detect_encoding function is UTF-8 encoded,$s 1 = iconv (' utf-8 ', ' GBK ', $string);$s 1 = mb_convert_encoding ($string, "GBK", "UTF-8"); I use the above two methods to transcode, the
Now there is a need to put the user comments in the picture automatically categorized as user photo album to facilitate other users to browse, previously there is a picture address in the database, if every time you view the album will query the
Title
Sina Weibo can collect video information through the URL of Qi Yi. Look for the information on the internet like the odd art no open API URL is also encrypted processing.
Ask twos, the great God who has done it.
Reply to discussion
Now you have the following questions
1, on the test.php page there is a
, test as follows:
10
20
30
Then there is a variable on this page $arr
Now I want to assign the value of option to $arr, and change the value of $arr every
To log user login logs, the table is as follows:
Table Name: Users_logsID: Auto IncrementIP: IP address with?Username: With a nameLogintime:datetime (e.g. 2014-02-13 10:18:01)Type: operation type (e.g. login)Descriptions: Description (e.g. user
Array:
111:222
333:444
555:666
How to use PHP reorganization to the following
111:222
333:444
555:666
Please the master function how to write help write thank you.
Reply to discussion (solution)
Please output the array prototype to
Ask, why does PHP think that two strings are equal?
if ("03E-004611" = = "36E-008026") echo ' equal ';
Reply to discussion (solution)
This post was last edited by xuzuning on 2014-02-08 17:10:29
Var_dump ("03E-004611" = = "36E-008026"); BOOL (
This post was last edited by Figer on 2014-01-28 15:44:49
I used eclipsephp Studio, and found that some of the downloaded HTML code would appear with an error message, such as the following:Page Auto "> Jump Will prompt:The start tag is not closed.
I gave it to Fckeditor2. X wrote a plugin and put it on the web for everyone to test.
Http://gufa.xp3.biz used to be ad-free, and is now forced to join the ad, causing it to not work. If you have a cow installed on your computer, you can use it
MySQL Database form
PHP Introduction, in the attempt to write a library database, database write some problems
Total interface Module
Book entry data Processing-collection
Approve preview data
' Echo ' CIP book in the catalogue: '.
My item number is duplicated, first to filter out duplicate records the item number shows one.
then pagination.
Now the problem is that the filter is done, but I do the first page, then filter, the results of each page is not as many,
Set 80, some
The problem with the PHP site is to directly close the browser is also displayed online status, only click on the safe exit to show the offline status, there is no code in the direct shutdown browser automatically triggered by the security exit link
Yesterday I want to through the background, template---template management in the default editor index.htm home file, after changing the point to save, prompted to modify the success.
Look at the first page when the same, and then edit the home file,
HTTP500 Error
Operating environment is: iis7.0+php5.32+sql2005
Open PHP Web page is normal, connected to the database, reported HTTP500 error. Find a solution.
The code for connecting to the database is as follows:
Link Database
$conn
If I now have the following lines of data:
"Hello, I am the World"
"Hello,my name is"
"Address is: http://www.baidu.com"
I want to extract a line that does not contain an "http" string, that is, the first two lines, how do you write a regular
For example, the CI framework, we invoke the pravite decorated function from the controller on the URL. It will jump to the 404_error interface. How is it implemented?
Reply to discussion (solution)
A private method function cannot be accessed
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