PHP Face question Description:
For example: My name is Fanglor = "ym Eman si Orlgnaf
The answer to the PHP interview question:
Copy Code code as follows:
function Restr ($STR)
{
$str 1 = Explode (', $str);
$str 2 = ';
$temp = ';
The principle of the function is very simple, the main thing is to use a recursive call.
Copy Code code as follows:
function File_list ($path) {
if ($handle = Opendir ($path)) {
while (false!== ($file = Readdir ($handle))) {
if ($file!=
If you use SQL statements to do too much work, so try to write a crosstab class, good apart, let's look at the code
Copy Code code as follows:
/**
* Basic Cross Table
* @author Hugh
*
*/
Class Pivot
{
Private $HORIZONTAL
Copy Code code as follows:
#*******************************************
#作用: No action on page, auto expiration function
#参数: $onlinetime The last time the current page was used
#参数: $interval page Timeout
#返回: None
#***********************
1, a recommended method: PHP to determine the search engine spider crawler or human access code, excerpted from Discuz x3.2
The actual application can be judged in this way, directly is not a search engine to perform operations
The first method: If the program does not affect the normal execution, you can use the Shielding method
You can add the first line of code
Error_reporting (e_all ^ e_notice);
Turn off warning of notice errors
The second method: navigate to the
Polymorphic definition: Only one interface or base class is concerned, but not the specific class of an object. (same type, different result)
Here are two examples:
First, we found that the base class defines the criteria, and subclasses perform
Just write a text message verification code module, need to use a specified number of random digits, and then found on the internet to find too terrible such a simple thing to use a good dozens of lines of multiple loops nesting ... There seems to
The first way: INSERT into inserts with the following code:
$params = Array (' value ' => ' 50′);
Set_time_limit (0);
echo Date ("H:i:s");
For ($i =0 $i insert ($params);
echo Date ("H:i:s");
The final display is: 23:25:05 01:32:05 it
This article describes the PHP simulation QQ login method. Share to everyone for your reference. The implementation methods are as follows:
The principle is to use the curl simulation to send a post login, cookies save local
This theory can
The examples in this article describe the Chinese and the numbers in the PHP implementation filter string. Share to everyone for your reference. The implementation methods are as follows:
function Getchinese ($string, $encode = "GBK") {
The example in this article describes how PHP implements XSS security filtering. Share to everyone for your reference. as follows:
function Remove_xss ($val) {//Remove all non-printable characters. CR (0a) and LF (0b) and TAB (9) are
This article illustrates the method of recursive implementation of infinite classification in PHP. Share to everyone for your reference. as follows:
1, ' name ' => ' dev ', ' ParentID ' => 0), array (' ID ' => 2, ' name ' => ' php ', '
First, we have to say what the cache in PHP is probably!
In PHP, we can roughly divide the cache into client cache (browser cache), server-side caching (the Serverõs cache). Because PHP is based on B/s architecture, we can understand the
The PHP code is as follows:
Copy Code code as follows:
$php _var = 1;
The code corresponding to C is:
Copy Code code as follows:
zval* C_var; Define PHP variable pointers
Make_std_zval (C_var); Initializing PHP
Learning points:1.LIMIT usage2. Various parameters3. Hyperlink call
First: Set up the digital paging module in the file first; my file is (blog.php)
Copy Code code as follows:
Paging module
$_page = $_get[' page '];
$_pagesize =
Upgrade the local development environment, not related to the production environment. In fact, from the 5.3.0 upgrade to the 5.3.3 process is quite simple, is to modify their own program a little trouble, encountered a small problem is to upgrade
This article is mainly the use of PHP functions to achieve digital and text pagination, the specific implementation of the steps will not wordy, directly on the code
/** * * @param $_sql * @param $_size/function _page ($_sql,$_size) {//Remove
Ajax submits the mobile phone number to the database for verification and returns the status value and ajax status value.
The backend receives the ajax submission value, queries the database, and returns the result.
Public function PhoneFind () {if
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