Click vào để xem chi tiết
Click vào để xem chi tiết
Click vào để xem chi tiết
Click vào để xem chi tiết
Click vào để xem chi tiết
Truy cập hôm qua:
1580
Truy cập hôm nay:
1551
Tổng lượt truy cập:
3059827
 
Website chính thức của Aptech Việt nam - FPT Aptech, Hà nội Aptech, Bách khoa Aptech, Mekong Delta Aptech, Hải phòng Aptech, CNC Aptech, Softech Aptech, Huế Aptech, Quy nhơn Aptech, Hưng yên Aptech, Thanh hoá Aptech, Thành đoàn Aptech, Nghệ an Aptech, Vũng tàu Aptech, Cà mau Aptech, Nam định Aptech, Aprotrain Aptech, Tiền giang Aptech, Haui Aptech, Trí việt Aptech, AiTi Aptech, An giang Aptech, Hùng vương Aptech, Thăng long Aptech, Aptech Nam Sài Gòn
September 10, 2010, 10:54 PM
Công nghệ

  • Asp2php Tool

  • After downloading the zip file you need to uncompress asp2php. You can do this with any version of pkzip or winzip or whatever. You should have an asp2php directory now with asp2php.exe in it. You can download pkzip from

    Using asp2php on Windows is the same as Unix. You need to open a DOS prompt box. Then you need to set your PATH to point to the directory asp2php is installed in or else when you use asp2php you must use full paths. For example:

    C:\apache\htdocs> asp2php -o phpdir -dir aspdir

    C:\apache\htdocs> c:\temp\asp2php\asp2php asppages -o phpdir -dir

    To set your path correctly (assuming asp2php is installed in c:\temp\asp2php) you can type:

    set path=c:\temp\asp2php

    If this is too much work you can download a graphical interface to asp2php by Jonas Lindau at

    http://www.pkware.com/downloads/. If you get the DOS version you can simply type:

    cd c:\temp (assuming you downloaded asp2php to c:\temp)
    unzip asp2php-0.76.12.zip

     

    Requirements

    There are no requirements for asp2php. You do not need a web server installed on your system to run this program. This is a stand-alone program that converts text files written in asp/vbscript (soon jscript) into text files written in PHP.

    http://hem.passagen.se/lindau/apwg/ or click here to read about a way Andrey Latyshev came up with to make windows ask if you want your asp files converted when you click on them.

     

    Uncompressing and Compiling

    First untar the archive with:

    tar xvzf asp2php.tgz

    Next type:

    make (to compile asp2php)
    make install (this will install asp2php in /usr/local/bin/ if you want. This is not required)
    make gui (optional if you want the gui)

     

    The Command Line

    Usage: asp2php <-options>
    -o
    -dir (input and output files are directories so copy recursively)
    -mysql -odbc -oracle -sybase -postgres (to select database)
    -uid
    -passwd
    -database
    -address
    -dsn
    -pngs (for converting links to gifs into png)
    -y2k (if your asp came from non-y2k compliant NT Box)
    -php3 or -php4 (change extension to .php3 or php4 instead of .php)
    -toupper (change all variables to uppercase)
    -tolower (change all variables to lowercase)
    -html (change links to .htm files to .html)
    -includes (change #includes to php requires())
    -addextension .xxx (filenames with .xxx extension get asp2php translated)
    -spacer (Space out php code differently)
    -gif2png (use gif2png instead of ImageMagick [-pngs mode only])
    -nomagick (don't convert gif files to png [-pngs mode only])
    -global_asa (include global.php in all pages)
    -fixwinpaths (fix windows paths [ '\' becomes '/' ])

    Basically you can just type:

    asp2php myaspfile.asp

    asp2php will create a php file called: myaspfile.php

    Asp2php will use default options to convert your pages. If you have database connections in your asp, asp2php will automatically try and figure out what to use for username, password, etc. for the PHP app. If you'd like to override these you can do so with command line options. Other command line options let you tell asp2php which type of database you'll be using on the PHP side, what the output file should be, or if asp2php should convert links to gifs to php.

    The -pngs mode allows asp2php to convert image tags to point to pngs instead of gifs (this is due to the fact that web pages that use GIF's must pay a big unnamed company $5,000 for licensing). For example:

    <img src="mike.gif"> will get converted to:
    <img src="mike.png"> in the new php code.


     

    Explaination of command line options

    -dir

    If you have a directory full of ASP files that you want to translate (ie. an entire website), you can translate it like so:

    asp2php -dir -o myphpwebsite myaspwebsite

    asp2php will create the directory myphpwebsite and copy all the asp, html, pictures, etc. into myphpwebsite and translate the .asp, .asa, and any other file extension you want into .php files.

    -addextension

    If you have some other files with extensions other than .asp that you'd like to translate, you can add them in with this. For example if you have some include files with the extension .inc you can type:

    asp2php -dir -addextension .inc -o myphpwebsite myaspwebsite

    You can have as many of those as you need.

    -global_asa

    This is limited support for global.asa files. You'll need to add the .asa extension on command line with -addextension .asa. This will tell asp2php convert your global.asa file into global.php. By using the -global_asa command line option asp2php will automatically add to the beginning of all your pages.


    The GUI

    To build the GUI simply type:

    make gui

    To run the GUI just type: ./gtkasp2php

    I'll have more docs on how to use it later. I don't have time to write documentation right now. Hopefully it's simple enough so you don't need docs tho.




     
    Click vào để xem chi tiết
    Click vào để xem chi tiết
    Click vào để xem chi tiết
    Click vào để xem chi tiết
    Download bài hát Aptech: Lời Việt + Lời Anh (Karaoke)
    Click vào để xem chi tiết
    Tổng lượt truy cập: 3059827
    Website chính thức của Aptech Vietnam
    Xem tốt nhất ở độ phân giải 800 x 600 với IE6.0 trở lên