Paip. Session debugging in PHP
Author of author attilax, 1466519819@qq.com
I use eclipse for PHP developers v3.0.2, And the built-in eclipse is v3.7.2.
Indigo, with Zend debugger v5.2.15, copyright
You can obtain PHPSESSID on the client.If you
The PHP extension and export class method is relatively simple. It can be directly applied on the developed PHP extension without affecting the original application. You only need to change XXX. C (XXX is the c file name extended by PHP)
Step 1:
Speak nonsense.Code:
Header ("Content-Type: image/GIF ");/** Initialization*/$ Border = 0; // whether the border is required; 1: 0: not required$ How = 4; // number of digits of the Verification Code$ W = $ how * 15; // Image Width$ H = 20; //
Remember that json_encode returns a string, while json_decode returns an object.
Determine that the data is not in JSON format:
FunctionIs_not_json($ Str){ReturnIs_null (json_decode($ Str));}
Determine that the data is legal JSON data:
(Prevent PHP
Source code Leakage suggestions)
1) Use mod_security to filter the output to prevent leakage. Use mod_security to filter output and prevent leakage (for example)
PHPCode
1. secfilteroutput on2. secfilterselective output "
2)
I. Classic Apache + PHP
I like nginx. I am not playing this game.
Ii. nginx + PhP5
Http://blog.csdn.net/kimsoft/article/details/7852956
It is also very convenient
Iii. Integration
3.1 XAMPP windows
Http://www.apachefriends.org/zh_cn/xampp-
Unified page Encoding
MySQL database encoding, HTML page encoding, PHP or HTML file encoding must all be consistent.1. MySQL database encoding: Specify the encoding (such as gbk_chinese_ci) when creating a database. do not specify the encoding when
PHP has a way to directly read the contents of the CSV file, that is, fgetcsv (). For detailed parameters and instructions, refer to the PHP manual.
It may be a bit of fun tonight, or how to use this function to write a function to read the contents
$ action ();}} class defaultapp extends baseapp {/*** this method will call */function index () {echo "defaultapp-> index () invoked";} function go () in the parent class () {// call the parent class parent: _ run_action () ;}}$ default = new
Http://www.cnitblog.com/fanyh/archive/2010/03/18/64720.html
Interceptor design in PHP
Class action {
Public Function perform (){Echo 'hello, fanyh! ';}}/*** Interceptor Interface* @ Author Administrator**/Interface interceptor {/*** Run the command
Let's talk about the differences between isset and empty:
Isset determines whether the variable exists or is null if it exists. That is to say, if a variable does not exist or the variable value is null, it is considered that there is no isset,
Study Notes
// Determine the Array$ Colors = array ("red", "blue", "green ");If (is_array ($ colors )){Echo ("colors is an array". " ");}// Double-precision data Determination$ Temperature = 15.23;If (is_double ($ temperature )){Echo ("$
#! /Usr/local/bin/PHP-QEcho "test parameters:/N ";Echo $ _ server ["argc"]. "/N ";// Display the input parameter value, which starts from Index 1Echo $ _ server ["argv"] [1]. "/N ";Echo $ _ server ["argv"] [2]. "/N ";Echo $ _ server ["argv"] [3].
PHP unit testing tool phpunit initial experience
Today, I received a task to calculate numbers. Because many conditions such as integers, decimals, and scientific notation are involved, manual testing is very troublesome, so I thought of PHP's unit
Document directory
1. Separating from HTML
Ii. Command Separator
3. Notes
To gain an in-depth understanding of PHP and make it easier to use PHP, This section describes the basic syntax of PHP.1. Separating from HTML
PHP scripts are caused by
Understanding opcodeOpcode is an intermediate language after PHP script compilation. It is like bytecode of Java or MSL of. net. For example, you wrote the following PHP code:
echo "Hello World";
$a = 1 + 1;
echo $a;
?>
PHP
Suppose you like to use PHP to build Web applications, and then there are some peripheral applications, including mobile terminal apps and mobile Web,
Because mobile apps and other non-PHP languages such as objectivec and Java are compiled, and you
PHP code:
html>head>title>Json Testtitle>SCRIPT src="jquery.js"> We initialize some test data, use the $. tojson method to encode it, and use the $. Post method to send it to phpfile. php:Copy the PHP content to the clipboard.
PHP code:
$res =
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