Can You run asp in php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Magic4You
    New Member
    • May 2007
    • 2

    Can You run asp in php

    hi

    i am new to php and i know that the asp tags in php are <% %> but if i had a complex bit of asp can i just paste the asp in to a php document as long as the asp is in between the asp tags???
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Originally posted by Magic4You
    hi

    i am new to php and i know that the asp tags in php are <% %> but if i had a complex bit of asp can i just paste the asp in to a php document as long as the asp is in between the asp tags???
    PHP can not run ASP code. Although they serve the same purpose, they are two very different things.
    If you paste the ASP code into a .php document and try to run it, one of two things will happen.
    Either PHP is configured to accept ASP markup, in which case it will try to execute your ASP code as PHP, obviously causing errors.
    Or it will ignore them all together and send them as HTML to the browser, where it will most likely be displayed as a part of the page.

    I'm sure this is possible with some trickery, but even then I would reccoment against it.

    Comment

    • Magic4You
      New Member
      • May 2007
      • 2

      #3
      ok thanks

      its just my m8 made some nice asp but wants to host it but my server is not supporting the asp so i thought about it in php

      i will give it a go and see what happens and report back my findings

      Comment

      Working...