The code is as follows
Copy Code
Var_export ($times, true); Cannot write to file after not adding true yo$fp = fopen (' aa.txt ', ' w+ ');Fwrite ($fp, Var_export ($times, true));Fclose ($FP);
Method Two
Using Serializ and
Base64_decodeDecodes the BASE64 encoded string.
Syntax: String Base64_decode (string encoded_data);
return value: String
Function type: Encoding processing
Content Description
This function is decoded with a MIME BASE64 encoded string. The
You can use this
The code is as follows
Copy Code
http://www.xxx.com/index.php?page=../etc/passwdhttp://www.xxx.com/index.php?page=../../../etc/passwdhttp://www.xxx.com/index.php?page=..../../etc/passwdGet more
Import OS
Import Sys
Import re
Import time
def listdir (dirs,liston= ' 0 '):
Flog = open (OS.GETCWD () + "/check_php Tutorial _shell.log", "A +")
If not Os.path.isdir (dirs):
Print "Directory%s is not exist"% (dirs)
Return
Lists =
PHP tutorials Several ways to prevent injection
In fact, it turns out that we need to filter some of our common keywords and conform to such as:
select,insert,update,delete,and,*, wait.
Example:
function Inject_check ($sql _str) {Return eregi ('
$arr =[ Array ( ' name ' = ' small Bad dragon ', ' age ' =>28 ), Array ( ' name ' = ' small bad Dragon 2 ', ' age ' = >14 ), Array ( ' name ' = ' small bad Dragon 3 ', ' age ' =>59 ),
Import and Export csv files
In work, you need to import csv file data to the database or export the database data as a csv file. The following is my simple implementation.
1 db_connection = $ db_connection; 11 $ this-> table_name = $ table_name; 12
Verification Code display, ticket without verification code
display Verification Code /* in the template html, use an img tag, request a SRC address that can generate an image. The address requested by back/views/login.html is still a
Install and use PHPunitInstall and use PHPunit in Linux
PHP archive (PHAR)To obtain PHPUnit, the simplest way is to download the PHP file package (PHAR) of PHPUnit, which binds all necessary components (and some optional components) required by
Talking about PHP reflection mechanism and PHP reflection mechanism
1. Introduction
-- PHP5 adds a new function: Reflection. This function enables phper to reverse-engineer class, interface, function, method and extension. With PHP code, you can
Summary of new features in PHP 7.1, and summary of new features in PHP
1. null type
The void type is mainly used for parameter type declaration and function return value declaration.
The two main forms are as follows:
It is easy to understand from
Compile and install PHP 7.0.13 in Centos 6.5, centos7.0.13
The official PHP7.0 version is also available. I have compiled and installed it today and wrote down the installation steps. I compiled it in the centos6.6 environment. The installation
PHP Singleton mode and instance code
PHP Singleton Mode
Concept of Singleton Mode
The Singleton mode refers to the design mode in which a class of the entire application has only one object instance. Specifically, as an object creation method, the
Node. JS file system parsing and node. js File Parsing
1. Node. js File System
Var fs = require ("fs ")
2. asynchronous and synchronous
Functions that read file content include asynchronous fs. readFile () and synchronous fs. readFileSync ().
Computing execution timeThe following simple method can be used to calculate the execution time of a program (subtle) The code is as follows:Copy code $ Start_time = microtime (true );// Code that requires time calculation//... Code here...Print
Applications with polymorphism in the php Tutorial class Instanceof: used to determine whether a given object comes from a specified object class. Class {}Class B {}$ Thing = new ();// Return trueIf ($ thing instanceof ){Echo 'A ';}// Return falseIf
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