PHP Programmer from Maoming ... Write the idea of a programmer in a small city. Hope to communicate with the large city of PHP technology exchange
First of all, my profile.
I live in the IT underdeveloped small city of Maoming.
As early as three
Use of the PHP header function
The cache of the Web page is controlled by the "Cache-control" in the HTTP message header, and the common values are private, No-cache, Max-age, must-revalidate, etc., and the default is private. Its function is
PHP compositing or creating GIF animations
1. First, you need to confirm the GD library is normal.
?
2. How to compose a picture, make sure to place the exploded image in the frames folder.
?
3. GIFEncoder.class.php class
?
?
"Does not supported
UA class for WAP acquisition with PHP
/**
* Class Name: Mobile
* Description: Mobile phone information class
Other
*/
Class Mobile
{
/**
* Function Name: Getphonenumber
* Function function: Take phone number
* Input Parameters: None
* Function
PHP cannot connect to MySQL server using localhost
MySQL is installed under Redhat, under the MySQL console, you can connect using localhost, but not when you connect in PHP. and using 127.0.0.1 can connect, view the Hosts file, found the
PHP isset () and empty () the difference between the use of a detailed
Reference
By learning the language of PHP, you should know that it is a function-based HTML scripting language. The large library of functions supports the implementation of PHP
AS3 using amfphp to communicate with PHP
From: http://bbs.9ria.com/thread-65836-1-1.html
?
First, the specific configuration, PHP version: 5.2.5,apache:2.2.11, (or WAMP2.2), Amfphp : Version 1.9 (attachment provided), Windows XP system. Note:
PHP Nginx to build records under Windows system
Build Nginx in conjunction with PHP under Windows System.
Get ready:
Download nginx http://nginx.org/en/download.html? Download stable version
? php5.0 and above version download
a configuration php
The question about die
echo ' Fuck ';
$db =mysql_connect (' localhost ', ' bp6am ', ' 123 ')
Or Die (' Unable to connect. ');
?>
This is my code.
Without echo, the entire Web page is HTTP error Internal Server error, and what does this die do here?
This is a file download code, why the file is always empty after download
function Down_file ($file _name, $file _sub_dir) {
$file _name=iconv ("Utf-8", "gb2312", $file _name);
$file _path=$_server[' Document_root '). $file _sub_dir. $file
The DL function does not use the
Header ("Content-type:image/png");
DL ("Php_gd2.dll");
$im = @imagecreate (100, 50)
Or Die ("Cannot Initialize new GD image Stream");
$background _color = imagecolorallocate ($im, 255, 255, 255);
$text _color =
Fixhtmltag
Version 0.2
This version resolves the last remaining problem, namely close closure and nested closure problems. You can see the comments of the code in detail.
Copy CodeThe code is as follows:
/**
* Fixhtmltag
*
* HTML tag repair
Copy CodeThe code is as follows:
=============================== Time Date ===============================
Y returns the last two digits of the year, the Y-year four digits, the M-month number, and the M-month English. D Month Date number, D week a
I think it should be a simple function to determine whether the date is valid, but it is still a bit cumbersome to think about it, because it is necessary to test the format, but also to check the validity. For example, 2013-02-29, although the
Copy CodeThe code is as follows:
PHP Whole station Anti-injection program, need to require_once this file in public file
Judging MAGIC_QUOTES_GPC Status
if (@get_magic_quotes_gpc ()) {
$_get = sec ($_get);
$_post = sec ($_post);
$_cookie = sec
Copy CodeThe code is as follows:
/**
* Insert Insertmodel (), use reflection, slightly less efficient
* @param class $model Object
* @param bool $is _returnlastinsertid whether to return add ID
* @return int is returned by default, $is
With the popularity of mobile devices, the site will also usher in more and more mobile device access. Adapt to the PC's page, many times the user is not friendly to the phone, then sometimes we need to determine whether users use mobile phone
1. Get_defined_vars(PHP 4 >= 4.0.4, PHP 5)-Gets an array of all defined variables
Array get_defined_vars (void)
This function returns a multidimensional array that contains a list of all defined variables, including environment variables, server
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