In php, The strstr, strpos, substr, strrchr, and stripos functions are usually used to find out whether a character exists in a string. If you need to know about them, please refer to them.
1. strstr-first appearance of the search string
String
In this article, we will introduce four common functions in php: ceil, floor, round, and intval.
Ceil-integer in one method DescriptionFloat ceil (float value)Returns the next integer of no less than value. If the value has a decimal part, it is
Below I have summarized some character Replacement Methods in php development, including direct replacement without regular expressions or replacement with regular expressions, and replacement using php built-in functions.
For example, there is a
In php, there are many expressions of time and date. The most common expressions are timestamps and common date formats. Next I will introduce the conversion between timestamps and dates.
1. Time Conversion Function in php
Strtotime
The strtotime ()
Constructor and destructor in php are both used in classes. Next I will introduce in detail the methods for using constructor and destructor in php classes, for more information, see.
Destructor
The role of php destructor is just opposite to that of
This article introduces the usage of PHP session_encode () and session_decode (). For more information, see this example.
Session_encode
Session_encode-encode the current session data into a string
DescriptionString session_encode
Chinese characters often bring us some trouble in php applications. Today, when I find an array on the Internet and convert it into xml, I find that the Chinese characters are empty. Then gg gets a better result after shutting down the sky, I would
When pdo_mysql is not installed, the system will prompt that pdo_mysql must be supported. Check whether the pdo_mysql module is correctly loaded. The installation method is simple. Let's take a look.
Solution:
1. Modify the local php. ini
Unlimited classification is a problem encountered in all program development. Next I will introduce an infinitely classified program implemented by php + mysql. If you need it, please refer to it.
Let's take a look at my database structure. The
There are many ways to use php to export a mysql database as an excel table. The simplest way is to directly use the php fputcsv function. You can also directly input the csv format, to generate a standard excel format, we need a third-party plug-in.
Curl is a FILE Transfer tool using URL syntax. It supports FTP, FTPS, http htpps scp sftp tftp telnet dict file and LDAP. Curl supports SSL certificates, http post, http put, and FTP uploads, kerberos, HTT-based upload, proxy, cookie, user +
In php, Constant and Define are constants. So I will introduce a method that can dynamically use the Constant and Define value methods. I hope this will be helpful to you.
How should I use PHP to show or use dynamic Constant/Define values? Ex: The
In php, the curl function is most commonly used to collect data. Because the curl function is a high-performance and multi-threaded function, I will introduce a php collection program, if necessary, you can refer to this document.
Function
Now there are more and more merchants using the public platform. The public platform provides me with a large number of api interfaces that can be used to interconnect with our website data, and then the user enters the content to automatically
Author: SuperHeiNature of the article: originalRelease date:Program descriptionOKPHP is a professional website management system developed by www.okphp.com. Its current products include Okphp CMS, Okphp BBS, and Okphp BLOG. Due to the instrict
SQL injection attacks are the most common means for hackers to attack websites. If your site does not use strict user input tests, it is often vulnerable to SQL injection attacks. SQL injection attacks are usually implemented by submitting bad data
This article briefly analyzes a vulnerability analysis of inlcude when the PHP file is included. I hope it will be of some use to you.
Basic File Inclusion vulnerabilities:
The Code is as follows:
Copy code
* Files in the
This article shares a php interview question 1. If you need it, please refer to it.
* Implement a function. Input a piece of text and parse the text into an array. The key of each element in the array line is specified by the input
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