标签:
常年做web的,工作需要,可能有的时候需要将asp代码批量转换成php,最近发现一个小东西很不错,虽不能100%转换(毕竟是程序),但是大大提高了工作效率
Asp2Php是一个可以将ASP转化成PHP的小程序,做web的可能有时会用到。
官方下载地址http://asp2php.naken.cc/download.php
Asp2Php使用方法:
单个转换:asp2php 文件名
如文件名是 amznz.asp 那么在CMD命令下输入
asp2php amznz.asp
目录转换:asp2php -dir 目录名 -o b
如目录名为 amznz 那么在CMD命令下输入 参数 b 为存放转换后的php文件的目录名
asp2php -dir amznz -o b
以下是详细参数
Usage: asp2php <-options> <infile.asp>
-o <output filename>
-dir (input and output files are directories so copy recursively)
-mysql -odbc -oracle -sybase -postgres (to select database)
-uid <database username>
-passwd <database password>
-database <database name or sid>
-address <database ip address or ip name>
-dsn <database ODBC 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 ‘/‘ ])
-longexternvars (use, for example, $HTTP_POST_VARS instead of $_POST)
-fulltags (asp2php will use <?php instead of <?)
-change_response_links (in response.write text as .asp will change to .php)
关键词:asp转php asp批量转php
标签:
原文地址:http://www.cnblogs.com/kclteam/p/5279020.html