How to use the String function in PHP the string manipulation function in PHP is more, the important is the following:
(1) echo,print,printf,sprintf
The first two functions are output strings. If a variable name is substituted in the string, it is
13. Type of Access
The access modifiers of a type allow developers to restrict access to class members, a new feature of PHP5, but
is a good feature of the OOP language. And most OOP languages already support this feature. PHP5 supports the
In this paper, we analyze some of the frustrating floating-point arithmetic in PHP. Share to everyone for your reference, specific as follows:
In the electrical business, the calculation price is unavoidable, and then found a hole in PHP,
This article is an example of how PHP obtains information about the server's operating system. Share to everyone for your reference, specific as follows:
The following is the basic statement that PHP obtains the current server information.
PHP
The example of this article summarizes the PHP image add watermark function. Share to everyone for your reference, specific as follows:
Example 1, very simple to add a watermark function under the diagram
Example 2, a more complete
This article describes the JSON Chinese processing solution for PHP. Share to everyone for your reference, specific as follows:
JSON is a widely used format for passing strings, which is easier to understand and easier to manipulate than XML, with
index.php
login.php
Please enter the code:
The above is a small series for everyone to bring the use of PHP drawing functions to achieve simple verification code function of the whole content, I hope that we support cloud-
As shown below:
/* Number = two digits + month +id four digits
/$id = $this->student_model->save (0, $data);
$SN = Date (' Y ', Time ());
$SN = substr ($SN,-2);
$sn. = Date (' m ', Time ());
Results Preview Example: 14120001
The
Convenient to have a car family at any time to understand whether they have traffic violations, to avoid the forgotten or overdue treatment of illegal tickets caused by unnecessary loss. This code example is based on aggregated data for the national
We know that a lot of open source software infinite classification is a recursive algorithm, but we know that recursion is a waste of time, but also a waste of space (memory),Last time I shared my own original infinite classification spanning tree
At present, there is an ASP program on the network of Self-Help Friendship Alliance is very popular, this program needs to fill in the title of their own website, URLs, mailboxes, profiles and other content and then submit, and in their own website
Common function Strstr ($STR, "abc");Regular matching Preg_match ("/(ABC)/is", $str);But to match a string that does not contain a string, it is more troublesome to use the positiveIf not regular!strstr ($STR, "abc"); We can solve the problem.But
Track_vars = on; Make the $http_*_vars[] array valid, here * in use
; ENV, POST, GET, COOKIE or server replacement
Post_max_size = 8M; The maximum size of post data that PHP will accept.
Gpc_order = "GPC"; The instruction was objected to. Replace
Generally speaking, a website that provides the member registration must collect the user's password, how to save the user's password is a problem. Of course we can't store passwords in the database in plaintext, because in this case, the general
Copy Code code as follows:
$myServer = "localhost"; Host
$myUser = "sa"; User name
$myPass = "password"; Password
$myDB = "Northwind";? MSSQL Library Name
$s = @mssql_connect ($myServer, $myUser, $myPass)
Or Die ("couldn ' t connect to
The LAMP combination is good, but if you want to set up a Web virtual host server that supports PHP, ASP, ASP.net, JSP, Perl, or IIS 6 with Windows 2003, it's best. There are a lot of articles on the web that describe PHP on IIS 6, but those methods
This example describes how PHP uses asterisks to hide user names, mobile phones, and mailboxes. Share to everyone for your reference, specific as follows:
PHP uses an asterisk instead of a username cell phone and mailbox this in many active
This article illustrates a simple PHP implementation of the previous page next page functionality. Share to everyone for your reference, specific as follows:
Idea Finishing:
Now a lot of people with ID 1 and minus 1 to achieve the previous and
The example in this article describes how PHP custom functions implement the format of seconds. Share to everyone for your reference, specific as follows:
function Vtime ($time) {
$output = ';
foreach (Array (86400 => ' Day ', 3600 => '
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