PHP is not as good as ASP.

Source: Internet
Author: User
PHP has been learning PHP for a while in three places that are better than ASP. I feel that PHP's overall function is much more powerful than ASP. in particular, the flexibility of provided functions and function parameters is at least an order of magnitude higher than ASP's. However, PHP is inferior to ASP in some aspects.

(1) when setting a Cookie, the setcookie function cannot have any HTML code output, which is inconvenient. Therefore, I thought using ob_start () to open the buffer zone can solve this problem, but it seems useless. writing an ob_start () statement can only reduce one warning.

(2) when setting a permanent Cookie, the setcookie function sets the third (expire) parameter for each Cookie variable. if each Cookie variable has the same expiration time, in this way, the expire parameter needs to be repeatedly written many times, while ASP can set a common expire for all multi-value cookies by using multi-value cookies.

(3) when adding, deleting, and modifying records in PHP, you can only execute SQL statements. ASP can also use rs in addition to this method. addnew, rs. update, rs. delete and other methods provided by record set objects. using this method can make the program clearer.

I don't know whether I am right or not. I don't know how to solve this problem. I welcome my colleagues to correct my point of view.

Of course, the worst thing about PHP is that it always requires a $ character, which is hard to input and seriously affects the speed of code input.


Reply to discussion (solution)

I just learned php, so take it easy ~~~

1. Why is it useless? you can use ob_start.

After learning PHP for a while, I feel that PHP's overall function is much more powerful than ASP, especially the flexibility of provided functions and function parameters is at least an order of magnitude higher than ASP. However, PHP is inferior to ASP in some aspects.

(1) when setting a Cookie, the setcookie function cannot have any HTML code output, which is inconvenient. Therefore, I thought using ob_start () to open the buffer zone can solve this problem, but it seems useless. writing an ob_start () statement can only reduce one warning.

(2) when setting a permanent Cookie, the setcookie function sets the third (expire) parameter for each Cookie variable. if each Cookie variable has the same expiration time, in this way, the expire parameter needs to be repeatedly written many times, while ASP can set a common expire for all multi-value cookies by using multi-value cookies.

(3) when adding, deleting, and modifying records in PHP, you can only execute SQL statements. ASP can also use rs in addition to this method. addnew, rs. update, rs. delete and other methods provided by record set objects. using this method can make the program clearer.

I don't know whether I am right or not. I don't know how to solve this problem. I welcome my colleagues to correct my point of view.

Of course, the worst thing about PHP is that it always requires a $ character, which is hard to input and seriously affects the speed of code input.

(1) Why is it useless? Ob_start () only blocks the subsequent direct output, but the previous output will still have an impact.
(2) it is difficult to read ASP multi-value cookies.
(3) ASP database operations are performed by using the adodb component, just like introducing a class in php. Components and classes have nothing to do with the language itself.

It is true that php has many inconveniences. If there is no, there will be no asp living space.

Php is still very popular

Is asp still used by companies. Net

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.