.php file

Last post 10-26-2008 2:23 AM by x2ws. 7 replies.

Sort Posts:

  • .php file

    10-25-2008, 6:52 AM
    • Member
      point Member
    • MigiHidari
    • Member since 10-25-2008, 10:48 AM
    • Posts 4

    I have a file that has .php extension. Questions:

    What does .php extension mean ?

    Can I convert it to .ASPX extension?

    Is there a tool to help me do that?

    Thanks fo your help.

    MH

  • Re: .php file

    10-25-2008, 7:11 AM
    Answer
    • All-Star
      30,593 point All-Star
    • HeartattacK
    • Member since 01-08-2007, 5:53 PM
    • Dhaka, Bangladesh
    • Posts 3,306
    • Moderator
      TrustedFriends-MVPs
    php is an entirely different server side technology than asp.net. There's no way to convert it automagically. .php means the file is meant to be used with a server running php. php stands for Hypetext Preprocessor.
    All that glitters is gold-
    Only shooting stars break the mold.

    Read my blog: www.heartysoft.com

    Tell me what tutorials / articles / videos you want to see on my site.
  • Re: .php file

    10-25-2008, 7:20 AM
    • Member
      point Member
    • MigiHidari
    • Member since 10-25-2008, 10:48 AM
    • Posts 4

     Thanks HeartAttack!

    I have been asked to convert this php code to ASP.NET.

    Do I have to recode this file line by line?

    I have looked at Microsoft php to ASP.NET migration assistant.  That seems to require Visual Studio installed.

    Is it possible to do it any other way?

    MH

     

     

  • Re: .php file

    10-25-2008, 8:05 AM
    • All-Star
      30,593 point All-Star
    • HeartattacK
    • Member since 01-08-2007, 5:53 PM
    • Dhaka, Bangladesh
    • Posts 3,306
    • Moderator
      TrustedFriends-MVPs

    Even the tool won't be able to convert complex pages. You'll probably need to do a lot of the converting manually.

    All that glitters is gold-
    Only shooting stars break the mold.

    Read my blog: www.heartysoft.com

    Tell me what tutorials / articles / videos you want to see on my site.
  • Re: .php file

    10-25-2008, 11:08 PM
    • Member
      point Member
    • MigiHidari
    • Member since 10-25-2008, 10:48 AM
    • Posts 4

     Does that mean looking at each line of code and converting it to VB or C# code?

    Another question:

    Someone sent me bunch of files that should represent a new website to be hosted on our web server.  Our web server is Windows 2003 IIS installed etc.  This file is the only one with php extension.  Rest are all css or XML files.  I understand those somewhat.

    When I convert this php file to ASP.NET, will this file be the one called default.aspx?

    Do I even make sense ?

    Thanks

     

  • Re: .php file

    10-25-2008, 11:22 PM
    Answer
    • Member
      162 point Member
    • x2ws
    • Member since 07-27-2007, 11:50 PM
    • Folsom, CA
    • Posts 31

    MigiHidari:
     Does that mean looking at each line of code and converting it to VB or C# code?

    Yes or reading and understanding the logic of the php file and converting it to VB/C# logic. You can call the file whateveryouwant.aspx, if you do call it  default.aspx and if your IIS server is configured to call the default.aspx file when someone goes to the domain url (e.g. http://www.example.com/) then IIS server will auto call default.aspx.

     From what I understand, PHP engine can be integrated with IIS. You might want to check that out if you do not have much experience with VB/C#.

     


  • Re: .php file

    10-26-2008, 1:22 AM
    Answer

    PHP can be installed on Windows 2003 and IIS will run it fine.  If you are in need of running .NET you will most absolutely have to convert it line by line.  Your CSS and you XML will transfer fine from PHP to .NET without any alteration.

    My I ask why you are being asked to convert an already working project to a completely different platform?

    See...
    PHP was designed to run on Linux
    .NET was designed to run on Windows
    PHP is a "scripted" language
    .NET is an "object oriented" language
    PHP integrates the code and the markup in a big mashup mess
    .NET separates the code from the markup

    This is definately not an apples to apples comparison... more like apples to sports cars.

    Chase

    Visual Studio 2008
    ASP.NET 3.5 (Visual Basic)
    SQL Server Express

    Check out my blog
  • Re: .php file

    10-26-2008, 2:23 AM
    • Member
      162 point Member
    • x2ws
    • Member since 07-27-2007, 11:50 PM
    • Folsom, CA
    • Posts 31

    I agree that there is a big difference between PHP and the .NET framework. .NET is a framework while PHP is just a language. Frameworks should not be compared to languages. C# and PHP can be compared because they are both languages. I personally would use C# if I had a choice.

    Btw, PHP is object oriented as of PHP5 release: http://us2.php.net/zend-engine-2.php

Page 1 of 1 (8 items)