The topic of the PHP interview question:$a = '/a/b/c/d/e.php '; $b = '/a/b/12/34/c.php '; Calculate the relative path of the $b relative to the $a should be ... /.. /c/dThe answer to the PHP interview question:
Copy Code code as follows:
With the progress of science and technology, two-dimensional code applications more and more widely, the site has an article introduced by using jquery plug-ins to generate two-dimensional code, today I give you to share the next how to use PHP to
Here is my solution to the problem, and finally I understand it completely, it's almost capsized in the gutter.
1. You must know that the line break in textarea is \ nthe (personal detection found to hit Enter is \ n, as if under Linux is \ r \ n)
2.
OK header (' http/1.1 ok ');
Set a 404 Header: Header (' http/1.1 404 Not Found ');
Set address to be permanently redirected header (' http/1.1 moved Permanently ');
Go to a new address header (' location:http://www.example.org/');
File Delay
This article illustrates the conversion classes of PHP implementation XML and data format. Share to everyone for your reference. as follows:
$val) {if ($priority = = ' t
Ag ') $attributes _data[$attr] = $val; else $result [' attr '] [$
However, the last few days suddenly bad, 90% of the attack has been unable to intercept, please look at the following chart of the day's statistics:
IP attack and start time
Number of attacks
1. Mucms a small, platform-independent content management system for non-interactive Web sites (sites only publish information). It is very low on system requirements and requires only apache+php. No database is used. It is safe, fast, easy to use
For TCP/IP, UDP, socket programming These words you are not very strange, right? With the development of network technology, these words are filled with our ears. Then I would like to ask:
1. What is TCP/IP, UDP?Where is the 2.Socket?What's
Looping to create a directory methodThis will generate the Image.gif directory
Copy Code code as follows:
$filepath = "Test/upload/2010/image.gif";
Mk_dir ($filepath);
Looping to create a directory
function Mk_dir ($dir, $mode = 0755)
{
The examples in this article describe the extension and inheritance usage of PHP classes. Share to everyone for your reference. as follows:
I hope this article will help you with your PHP programming.
Look at the following example:
Copy Code code as follows:
$array = Array (1,2,3);
function Add (& $arr) {
$arr [] = 4;
}
Add (@ $array);
Print_r ($array);
/**
At this point, the $array has not changed, the output:
The examples in this article describe how PHP accurately obtains file MIME types. Share to everyone for your reference. The implementation method is as follows:
' application/postscript ', ' eps ' => ' application/post Script ', ' exe ' => '
1. Make a simple upload file first
Copy Code code as follows:
Enctype= "Multipart/form-data" >
Filename:
Copy Code code as follows:
if ($_files["file" ["Size"] {
if
Let's look at the general effect.
So let's just post the code right next.
To share one more to generate the Chinese authentication Code
Let's take another example.
Next, just call on the page:
If
Streams is a powerful tool that PHP provides, and we often inadvertently use it, and if good usage will greatly increase PHP productivity. After harnessing the power of streams, the application will be elevated to a new level.
The following is a
When executing a. php file under the PHP command line, the working directory of the Execution Environment (GETCWD ()) is the directory of the PHP Command Program (php.exe), so if you want to use a relative path within the file, switch the current
Nginx pseudo-static configuration and common Rewrite pseudo-static rules, nginxrewrite
Pseudo-static is a way to change the file suffix to any possible one. If I want to convert the PHP file pseudo-static to an html file, this is quite simple, the
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