Two ways to check if a link exists in PHP
In PHP, check whether a link exists, there are two methods, one is using curl, the other is
Get the HTTP header of the response code, if it is 200 is OK, if it is 404 can not be found, the example is as
PHP array access to some problem guessing
First: It is said that the PHP array is a copy of the Perl array, but its use has been simplified.
So, to access the members of an array is naturally:
$ array name [key name]
Or
$ array Name {key Name}
PHP bool false and numeric 0
Ext.: http://home.phpchina.com/space.php?uid=108724&do=blog&id=54899
PHP is a loose-type language, which means that the Boolean value false and the integer value 0 are treated the same (even C also treats 0 and false
PHP constant Define () constant (), defined ()
Define―― defines constants, if true, is not case-sensitive when readBOOL Define (string name, mixed value [, BOOL case_insensitive])
Constants can only contain scalar data
Solve php download file in IE, file name is garbled problem
Typically, you can export files as streams using the following code instead of opening files
Header ("Content-type:application/force-download; Charset=utf-8;name=\ "$file _name\\");
Resolve numbers to scientific count when exporting to excel in PHP
When you encounter data export to Excel, the number format is not correct, generally divided into the following two cases
1, Excel cell set length is not enough, the workaround
PHP get random numbers and letters method Daquan
The first of these methods
$FileID =date ("Ymd-his"). '-' . Rand (100,999);
$FileID a random number such as 20100903-132121-908.
?>
The second method of
function Randomkeys ($length)
Reprint PHP Array (2)
Original: http://taobeibei.iteye.com/blog/614857
What is an array?
You will need to create many similar variables in the process of using PHP for development, either early or late.
Without a lot of similar variables, you can
PHP5 Basic concepts of objects and classes
Inherited from the most basic concepts, mainly for experienced object-oriented programmers and readers who have not yet touched the object.As a PHP programmer, you certainly know the variables and
Basic steps for getting started with PHP in a week
A week's time to get started!Yes, for already have Java-based,. NET, such as the target language, web development work experience, PHP has enough time to get started in a week, up to no more than
thinkphp Remove the index.php in the URL, absolutely works!
For example, your original path is http://localhost/test/index.php/index/add.So now the address is http://localhost/test/index/add.How to get rid of index.php?The mod_rewrite.so module
Windows Redis Installation and PHP usage
I. Installing REDIS and enabling services
1 Download Redis Client
?
Http://code.google.com/p/servicestack/wiki/RedisWindowsDownload#Download_32bit_Cygwin_builds_for_Windows
?
2 Unzip to the directory you
Use PHP script to invoke another PHP script under Linux
This Linux space only FTP permissions open to me ~ ~ Now I want to write a script first.php to execute second.php
Execution second.php don't know how to write ~ ~
first.php
Set_time_limit
How does Linux install the rewrite module for Apache?
The answer on the Internet is: Build a mod_rewrite.so file inside the Apache installation package successful experiment
Problem:
This server I don't know where the Apache installation package
Which hero has the Zend Framework 2 Chinese document? English looking at the arduous, for Chinese documents!!
------Solution--------------------
No or very incomplete at present (only a very small number of Chinese translators inherit from
Excel import MySQL data loss
Last night did not solve a night, come here for help, thank you.
for ($j =3; $j {$a = $objPHPExcel->getactivesheet ()->getcell ("a". $j)->getvalue ();$a =iconv ("UTF-8", "Gbk//ignore", $a);//transcoding$b = $objPHPExcel-
There's a problem with PHP and MySQL that needs to be solved.
is to use PHP to connect to the MySQL database and then query the data
$conn =mysqli_connect ("localhost", "root", "469201743", "my_db");
$conn->query (' Set names gb2312 ');
if (empty
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