You can define a calling method on the page, as follows:
Copy CodeThe code is as follows:
function GetData () {
$.getjson ("http://123.123.123.123/?callback=?",
{
"M": "Data",//Specify PHP file name
"Act": "GetData",//Specify the method in PHP file
To solve this problem, you need to check whether your program is allocating too much memory, and you can increase the PHP memory limit (memory_limit) by a few methods if there is no problem with the program.
Check PHP for Memory limit values
To view
This is the list of the 13 PHP coding good habits, if you have better suggestions, welcome to the comments later in this article, I am a person who likes to seek knowledge
1. When querying information from the same database using SELECT, use a join
In PHP Web development, the most basic PHP environment for PHP, Apache/iis, MySQL, for the management of the database, in addition to the MYSQL database itself provides command line tools for developers to manage the database, PHP-based development
Copy CodeThe code is as follows:
Commonly used numerical judgment function
Judging arrays
$colors = Array ("Red", "Blue", "green");
if (Is_array ($colors))
{
Print ("Colors is an array". "
");
}
Double Precision number
Copy CodeThe code is as follows:
Require_once ("mssql.class.php");
1. Create a class and connect to the database
$DB = new MSSQL ("Dns=aaa;uid=sa;pwd=sa;dbname=test");
2. Connect to the database
$conn = $db->config
phpMyAdmin is a frequently used MySQL management tool, backup and restore is an important function of phpMyAdmin, in the restoration of the database often encountered such a situation: phpMyAdmin restore the database when the maximum upload limit: 2,
Finding resources from multiple parties and testing has finally solved the problem, the special record.
In fact, if the installation, the correct installation, will not appear the following information.
If installed under Linux, when prompted
Or, does PHP design itself avoid a direct view of the contents of a file? From a security standpoint, what protection should this system-level file do?
The answer of the netizen perfect
After investigation, the following common methods are obtained:
Something that is often done and often thought of.
Obscure if condition
1) for | | The processing
The code above will take more time than the following code.
Although reducing the number of lines of code is a good goal, minimizing the
A very small problem has been dealt with today.
The requirement is that, from Monday to Sunday, you can only see data from Monday to Sunday.
Here, you can query the range directly from the database based on the Date field.
But you need PHP to
The Number_format () function formats numbers by using thousands of groupings.
Grammar
Number_format (Number,decimals,decimalpoint,separator)
Parameters
Description
Number
Necessary. The number to format.If no
Copy CodeThe code is as follows:
/**
* Generate an array of months from the start month to the end month
* This method is modeled after the Party Getdatearr () method
* @param unknown_type $start
* @param unknown_type $end
*/
function Getmontharr
Linux version: Ubuntu 12.04
The configuration of PHP MySQL and Apache was completed today
Mainly source code configuration,
Apache is mainly 2.4.2 version
PHP is mostly 5.3.11 version
MySQL is mostly 5.1.62 version
A few days ago tried several
Where is the 1.SESSION information stored?
Copy CodeThe code is as follows:
Session_Start ();
$_session[' name ']= ' Marcofly ';
?>
The session is saved to the C:\Windows\Temp directory by default, but you can change the save path of the session
The function used to define the top-level exception handler is
Set_exception_handler ("My_exception");
The my_expection here is a developer-defined exception handler, a top-level exception processor that handles exceptions only if there are no
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