PHP isetal ASP for three places

Source: Internet
Author: User
PHP is not as good as ASP three places
Learning PHP for some time, feel that PHP overall function is much more powerful than ASP, especially the function and function parameters provided more flexibility than ASP at least one order of magnitude. But PHP is not as good as ASP in some places.

(1) When setting a cookie, there can be no HTML code output in front of the Setcookie function, this is really inconvenient, I thought that using Ob_start () to open the buffer can solve the problem, but it seems useless, write a sentence ob_start () can only reduce a warning.

(2) When setting a persistent cookie, the Setcookie function sets the third (expire) parameter for each cookie variable, and if each cookie variable expires at the same time, then it is obvious that the expire parameter is repeated many times. ASP, however, can set a common expire for all multi-valued cookies by using a multi-valued cookie.

(3) When adding, deleting, and modifying records, PHP can only use the method of executing SQL statements, and the ASP can use the method provided by Recordset objects such as Rs.addnew,rs.update,rs.delete in addition to this method, which can make the program more clear.

I do not know the above points are I say right, or I ignorant do not know there is a better solution, welcome colleagues to correct my point of view oh.

Of course, PHP is the most difficult place is: always enter the $, and this symbol is very bad input, seriously affect the speed of my input code.

Share to:


------Solution--------------------
1, why useless, with Ob_start () is completely possible.

------Solution--------------------
(1) Why is it useless? Ob_start () only blocks subsequent direct output, but the previous output will still have an impact
(2) ASP's multi-valued cookie is cumbersome to read, rather than a single set
(3) ASP's database operation is done with the help of the ADODB component, which is like introducing a class into PHP. What functionality is provided by components and classes is not related to the language itself

Admittedly, PHP does have a lot to do with. If not, it really does not have the ASP's living space
  • 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.