Click here to Skip to main content
11,717,887 members (82,649 online)
Click here to Skip to main content

asp2php shell

, 21 Aug 2005 232.6K 11.6K 33
Rate this:
Please Sign up or sign in to vote.
A shell application for the asp2php utility.

Sample Image - a2pshell.jpg

Introduction

OK, well, this isn't going to change the world or anything but I developed it because I needed it and I figured I'd share it with y'all because we do that at CodeProject right?

What is it? Well if you have ever tried to use the .asp to .php conversion utility (asp2php written by Michael Kohn) you may have had the same problems I had to do with converting whole directory structures in one go. It seems as though a single file error causes the whole conversion process to abort. Then you have the choice to convert the files one by one (ugh!) or write something like this (yay!).

Michael has done a great job on the utility and although it's not perfect it sure does give you a good start when you have to convert a site from .asp to .php.

Using the code

The code presented here isn't anything radical like I said before but it may prove useful to some people who don't know how to do things like recursive file searching and shelling out to other apps. The code is commented enough and simple enough to be understandable by most people. I think so, I'm not going to go into detail here ... just look at it and say "big deal!" I know there are a lot of you who are way better than me at writing code so any idiot mistakes you find please let me know ... as well as anything that could be done better if you can be bothered to tell me about them Smile | :)

Acknowledgements

Oh yeah ... a big thanks to Dana Holt (I swear I thought you were female from your name) for the 'Browse For Folder" classes ... it was late and I was too tired to figure that stuff out and he had posted it here on CodeProject so I used it Smile | :)

Using the program

After you compile the program (or download the release version) just put it in the same folder as the asp2php utility and off you go Smile | :)

Update

I finally got round to fixing the "spaces in the path" problem ... it still wont change your world but it's a bit better...

History

  • 10th Feb 2003 - Version 1.
  • 12th August 2005 - Version 1.1.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

l a u r e n
Software Developer
Germany Germany
i write code and i travel and i like dinosaurs and i write in lowercase

You may also be interested in...

Comments and Discussions

 
Questiona question from sureshkaki Pin
Sean Ewington8-May-07 3:31
staffSean Ewington8-May-07 3:31 
QuestionWhere do PHP files go? Pin
Rhettinari1-Sep-04 12:32
memberRhettinari1-Sep-04 12:32 
AnswerRe: Where do PHP files go? Pin
ghanley7-Nov-04 14:50
memberghanley7-Nov-04 14:50 
GeneralRe: Where do PHP files go? Pin
Abunai10-Dec-04 9:28
memberAbunai10-Dec-04 9:28 
AnswerRe: Where do PHP files go? Pin
sunner13-Dec-04 12:28
membersunner13-Dec-04 12:28 
Generaldid not convert anything Pin
iffo10-Jul-04 4:07
memberiffo10-Jul-04 4:07 
Questionwhere are the converted files? Pin
daino30-Apr-04 6:15
memberdaino30-Apr-04 6:15 
AnswerRe: where are the converted files? Pin
Pulsorock19-May-04 19:08
sussPulsorock19-May-04 19:08 
AnswerRe: where are the converted files? Pin
el_ade1-Jul-04 0:22
memberel_ade1-Jul-04 0:22 
GeneralDid not work at all for me Pin
virtual78-Dec-03 11:57
membervirtual78-Dec-03 11:57 
GeneralRe: Did not work at all for me Pin
l a u r e n8-Dec-03 17:19
memberl a u r e n8-Dec-03 17:19 
GeneralMe2, it's still asp files Pin
Mad4U24-Feb-04 19:20
memberMad4U24-Feb-04 19:20 
GeneralRe: Me2, it's still asp files Pin
l a u r e n25-Feb-04 7:03
memberl a u r e n25-Feb-04 7:03 
GeneralDidn't work on the things I needed it for Pin
DaAlmighySmithy2-Mar-04 15:58
memberDaAlmighySmithy2-Mar-04 15:58 
GeneralPHP and ASP with IIS Pin
farocam65-Dec-03 8:03
memberfarocam65-Dec-03 8:03 
GeneralRe: PHP and ASP with IIS Pin
l a u r e n5-Dec-03 8:29
memberl a u r e n5-Dec-03 8:29 
GeneralRe: PHP and ASP with IIS Pin
farocam65-Dec-03 8:54
memberfarocam65-Dec-03 8:54 
GeneralRe: PHP and ASP with IIS Pin
l a u r e n5-Dec-03 8:57
memberl a u r e n5-Dec-03 8:57 
GeneralRe: PHP and ASP with IIS Pin
farocam68-Dec-03 5:07
memberfarocam68-Dec-03 5:07 
GeneralRe: PHP and ASP with IIS Pin
Gary Canada10-Feb-09 10:06
memberGary Canada10-Feb-09 10:06 
Generalfile/directory names with spaces Pin
borsnpl28-Apr-03 23:05
memberborsnpl28-Apr-03 23:05 
The program does not work when a long directory name is selected due to space letter in it such as "C:\Documents And Settings\Desktop\asp2php".
When you execute asp2php with these arguments original program parse it wrongly.

So I have to change the code like that:
sCmdLine.Format("asp2php %s \"%s\\%s\"",sOptions,szPath,fd.cFileName);

To anyone who cares.

Stop trying to hit me then hit me! (The Matrix)
GeneralWhy does this site have .asp extensions!! Pin
barrymac2-Apr-03 5:42
memberbarrymac2-Apr-03 5:42 
GeneralRe: Why does this site have .asp extensions!! Pin
TJDEV27-Jun-07 15:14
memberTJDEV27-Jun-07 15:14 
GeneralRe: Why does this site have .asp extensions!! Pin
l a u r e n27-Jun-07 15:18
memberl a u r e n27-Jun-07 15:18 
GeneralMe :-) Pin
Dana Holt1-Apr-03 7:54
memberDana Holt1-Apr-03 7:54 
GeneralPHP 2 ASP Pin
m4h13-Mar-03 4:38
memberm4h13-Mar-03 4:38 
GeneralRe: PHP 2 ASP Pin
binaiko5-Jan-08 2:31
memberbinaiko5-Jan-08 2:31 
GeneralDoesnt do anything Pin
tuin11-Mar-03 5:25
membertuin11-Mar-03 5:25 
GeneralRe: Doesnt do anything Pin
PerFnurt6-Apr-04 2:17
memberPerFnurt6-Apr-04 2:17 
Questionwhy doesn't it convert the entire code? Pin
tokyo1321-Feb-03 5:01
membertokyo1321-Feb-03 5:01 
AnswerRe: why doesn't it convert the entire code? Pin
lauren21-Feb-03 5:10
memberlauren21-Feb-03 5:10 
QuestionHow to ask question? Pin
lanlijing10-Feb-03 14:47
memberlanlijing10-Feb-03 14:47 
AnswerRe: How to ask question? Pin
lauren10-Feb-03 14:57
memberlauren10-Feb-03 14:57 
GeneralRe: How to ask question? Pin
lanlijing10-Feb-03 15:56
memberlanlijing10-Feb-03 15:56 
GeneralRe: How to ask question? Pin
Nitron10-Feb-03 16:12
memberNitron10-Feb-03 16:12 
GeneralRe: How to ask question? Pin
lanlijing10-Feb-03 18:45
memberlanlijing10-Feb-03 18:45 
GeneralLabel missing apostrophe in "don't" Pin
Shog910-Feb-03 8:55
memberShog910-Feb-03 8:55 
GeneralRe: Label missing apostrophe in "don't" Pin
Jonny Newman10-Feb-03 9:08
memberJonny Newman10-Feb-03 9:08 
Generalheads up... Pin
lauren10-Feb-03 8:46
memberlauren10-Feb-03 8:46 
GeneralNicely Done Pin
Roger Wright10-Feb-03 8:38
memberRoger Wright10-Feb-03 8:38 
QuestionBut Why? Pin
Blake Coverett10-Feb-03 8:20
memberBlake Coverett10-Feb-03 8:20 
AnswerRe: But Why? Pin
Roger Wright10-Feb-03 8:36
memberRoger Wright10-Feb-03 8:36 
GeneralRe: But Why? Pin
Jonny Newman10-Feb-03 9:05
memberJonny Newman10-Feb-03 9:05 
GeneralRe: But Why? Pin
Roger Wright10-Feb-03 21:11
memberRoger Wright10-Feb-03 21:11 
GeneralRe: But Why? Pin
Tili11-Feb-03 7:50
memberTili11-Feb-03 7:50 
AnswerRe: But Why? Pin
Paul Watson10-Feb-03 8:41
sitebuilderPaul Watson10-Feb-03 8:41 
GeneralRe: But Why? Pin
Nick Parker10-Feb-03 9:19
editorNick Parker10-Feb-03 9:19 
GeneralRe: But Why? Pin
Jörgen Sigvardsson10-Feb-03 11:12
memberJörgen Sigvardsson10-Feb-03 11:12 
GeneralRe: But Why? Pin
David Wulff10-Feb-03 17:17
memberDavid Wulff10-Feb-03 17:17 
AnswerRe: But Why? Pin
lauren10-Feb-03 8:42
memberlauren10-Feb-03 8:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150901.1 | Last Updated 22 Aug 2005
Article Copyright 2003 by l a u r e n
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid