Several common PHP problems

Source: Internet
Author: User
In PHP, to end a script area, use? Or? (To add a new row ). In the above program, you need to add additional line breaks in each PHP area.

What should I do if I want to add a new row?

In PHP, to end a script area, use "?> "Or"?> "(To add a new row ). In the above program, you need to add additional line breaks in each PHP area.

Why does PHP look like this? Because when formatted as HTML, you do not need a new line. But when you generate a very long line of source code, it will make it very difficult for you to read.

When I run the following script, it will output an error message. what should I do?

  1. Function myfunc ($ argument ){
  2. Echo $ argument + 10;
  3. }
  4. $ Variable = 10;
  5. Echo "myfunc ($ variable) =". myfunc ($ variable );

Why? To return the result of a custom function, you need to use return to return the result, rather than echo function.

How do I find all predefined PHP values?

The best way is to create a new page and use And load it in the browser. It displays all the PHP parameter information, environment variables, specific variables of the WEB server, and HTTP-related variables. The main reason for not placing the complete variable value in the file is that it varies with the server.

PHP and IIS cannot be used together?

It is confirmed that all users who run PHP scripts have the right to run php.exe! IIS uses anonymous (anonymous) as the running account. This account number must have the right to run php.exe. Make IIS aware of the PHP engine.

What is the difference between the "dl ()" function and directly configuring php. ini?

Using dl is dynamic, while directly compiling is to compile the function directly into php, which is more efficient, but the former is more flexible to deploy.


Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.