Home Backend Development PHP Tutorial PHP, ASP.JAVA, JAVA code formatting tool arrangement_PHP tutorial

PHP, ASP.JAVA, JAVA code formatting tool arrangement_PHP tutorial

Jul 21, 2016 pm 03:37 PM
http java php code tool tidy format

PHP code formatting tool http://www.waterproof.fr/products/phpCodeBeautifier/
I recently modified a code that has no indentation at all. Use this to format it.
Equivalent to the previous indent of c
By the way, write other languages ​​​​
c, c++ c# ==> indent Astyle
java ==> astyle Jalopy Jacobe ImportScrbber
php ==> ; phpCodeBeautifier
perl ==> perlTidy
python ==> Pydent
asp ==> VBSBeaut

TR> TABLE> http://www.bkjia.com/PHPjc/321957.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321957.htmlTechArticlePHP code formatting tool http://www.waterproof.fr/products/phpCodeBeautifier/ Recently modified a code, There is no indentation at all, you can use this to format it. Equivalent to before...
Tool name Applicable languages Introduction Installation/Usage
indent c indent is synonymous with code beautification tools indent is a standard tool that comes with gcc,
工具名称 适用语言 简介 安装/使用
indent c indent就是代码美化工具的代名词 indent是gcc附带的一个标准工具,
indent [options] [input-files]
indent [options] [single-input-file] [-o output-file]
perltidy perl perltidy本身也是用perl写的 下载后: perl Makefile.PL;make;make install
perltidy [ options ] file1 file2 file3 ...
(output goes to file1.tdy, file2.tdy, file3.tdy, ...)
perltidy [ options ] file1 -o outfile
perltidy [ options ] file1 -st >outfile
perltidy [ options ] outfile
astyle c c++ java (php) 一个速度很快的C/C++/Java源代码美化工具。
astyle比indent好在有很多成套的的风格定义:ansi java linux...不必记住复杂的缩进具体选项。
下载源代码解包后,make, 生成astyle可执行文件
astyle [options] < Original > Beautified
astyle [options] Foo.cpp Bar.cpp [...]
astyle --style=ansi *.cpp
我尝试过用它来格式化PHP程序也很有效(当然是不合HTML代码混在一起的纯PHP代码)。
jalopy java 功能强大的JAVA代码格式化工具,除了标准界面外,命令行工具,还可作为ANT JBUILDER ECLIPSE JDEVELOPER等工具的插件使用,并提供API 从http://prdownloads.sourceforge.net/jalopy/下载
并参考相应安装文档
pydent python pythius包含了2个工具:
pydent: 代码缩进工具
pystat: 代码统计工具
下载源代码解包后:
Run "python setup.py build"
Run "python setup.py install"
htmltidy html/xml HTML代码的纠错工具,可以帮助你的HTML代码更好的符合W3C规范,现在被称作tidy,因为它不仅只使用于HTML,也现在也适用于XHTML XML的格式化。

但JSP不适合ASP PHP JSP等嵌入式脚本的代码美化

 

下载源代码后 make 生成tidy可执行文件:
tidy file1 file2 ...
注意:对于含有中文的页面要使用 -raw选项
tidy.exe -raw -imuq -wrap 132 -f %f.err %f
选项说明:
-raw: 不修改中文字符 (output values above 127 without conversion to entities)
-i indend 缺省HTML按2个空格缩进
-m 覆盖原文件
-u 强制所有HTML标记大写(这个可以不加)
-wrap 页面代码宽度大于132行强制换行
-f %f.err 将错误输出到"相应文件名.err"文件中
HTMLTIDY支持XML的格式美化:
tidy -xml -imq web.xml
tidy -xml -imq build.xml
indent [options] [input-files]indent [options] [single-input-file] [-o output-file ]
perltidy perl perltidy itself is also written in perl After downloading: perl Makefile.PL;make;make install

perltidy [ options ] file1 file2 file3 ...

(output goes to file1.tdy, file2.tdy, file3 .tdy, ...)perltidy [ options ] file1 -st >outfileperltidy [ options ] outfile
astyle c c++ java (php) A fast C/C++/Java source code beautification tool. Astyle is better than indent in that it has many complete sets of style definitions: ansi java linux... There is no need to remember complex indentation specific options. After downloading the source code and unpacking it, make, generate astyle executable fileastyle [options] < Original > Beautifiedastyle [options] Foo.cpp Bar.cpp [ ...]astyle --style=ansi *.cppI have tried using it to format PHP programs and it works well (of course it is pure PHP code that is not mixed with HTML code).
jalopy java A powerful JAVA code formatting tool. In addition to the standard interface, the command line tool can also be used as a plug-in for ANT JBUILDER ECLIPSE JDEVELOPER and other tools, and provides API Download from http://prdownloads.sourceforge.net/jalopy/and refer to the corresponding installation documentation
pydent python pythius includes 2 tools: pydent: code indentation toolpystat: code statistics tool After downloading and unpacking the source code:Run "python setup.py build"Run "python setup.py install"
htmltidy html/xml HTML code debugging tool can help your HTML code better comply with W3C specifications. It is now called tidy because it is not only used for HTML, but also for XHTML XML. formatting. But JSP is not suitable for code beautification of embedded scripts such as ASP PHP JSP
After downloading the source code, make generates the tidy executable file: tidy file1 file2...Note: Use the -raw option for pages containing Chinese
tidy.exe -raw -imuq -wrap 132 -f %f.err %f
option description: -raw: Do not modify Chinese characters (output values ​​above 127 without conversion to entities) -i indend Default HTML is indented by 2 spaces -m Overwrite the original file-u forces all HTML tags to be capitalized (this can be omitted) -wrap forces a newline if the page code width is greater than 132 lines -f %f.err outputs the error to the "corresponding file name.err" file HTMLTIDY supports XML format beautification: tidy -xml -imq web.xmltidy -xml -imq build.xml
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Meme Coin Exchange Ranking Meme Coin Main Exchange Top 10 Spots Meme Coin Exchange Ranking Meme Coin Main Exchange Top 10 Spots Apr 22, 2025 am 09:57 AM

The most suitable platforms for trading Meme coins include: 1. Binance, the world's largest, with high liquidity and low handling fees; 2. OkX, an efficient trading engine, supporting a variety of Meme coins; 3. XBIT, decentralized, supporting cross-chain trading; 4. Redim (Solana DEX), low cost, combined with Serum order book; 5. PancakeSwap (BSC DEX), low transaction fees and fast speed; 6. Orca (Solana DEX), user experience optimization; 7. Coinbase, high security, suitable for beginners; 8. Huobi, well-known in Asia, rich trading pairs; 9. DEXRabbit, intelligent

Top 10 Digital Virtual Currency Apps Rankings: Top 10 Digital Currency Exchanges in Currency Circle Trading Top 10 Digital Virtual Currency Apps Rankings: Top 10 Digital Currency Exchanges in Currency Circle Trading Apr 22, 2025 pm 03:00 PM

The top ten digital virtual currency apps are: 1. OKX, 2. Binance, 3. gate.io, 4. Coinbase, 5. Kraken, 6. Huobi, 7. KuCoin, 8. Bitfinex, 9. Bitstamp, 10. Poloniex. These exchanges are selected based on factors such as transaction volume, user experience and security, and all provide a variety of digital currency trading services and an efficient trading experience.

Top 10 digital currency exchange app recommendations, top ten virtual currency exchanges in the currency circle Top 10 digital currency exchange app recommendations, top ten virtual currency exchanges in the currency circle Apr 22, 2025 pm 03:03 PM

Recommended apps on top ten digital currency exchanges: 1. OKX, 2. Binance, 3. gate.io, 4. Huobi, 5. Coinbase, 6. KuCoin, 7. Kraken, 8. Bitfinex, 9. Bybit, 10. Bitstamp, these apps provide real-time market trends, technical analysis and price reminders to help users monitor market dynamics in real time and make informed investment decisions.

What are the digital currency trading platforms in 2025? The latest rankings of the top ten digital currency apps What are the digital currency trading platforms in 2025? The latest rankings of the top ten digital currency apps Apr 22, 2025 pm 03:09 PM

Recommended apps for the top ten virtual currency viewing platforms: 1. OKX, 2. Binance, 3. Gate.io, 4. Huobi, 5. Coinbase, 6. Kraken, 7. Bitfinex, 8. KuCoin, 9. Bybit, 10. Bitstamp, these platforms provide real-time market trends, technical analysis tools and user-friendly interfaces to help investors make effective market analysis and trading decisions.

Reliable and easy-to-use virtual currency exchange app recommendations The latest ranking of the top ten exchanges in the currency circle Reliable and easy-to-use virtual currency exchange app recommendations The latest ranking of the top ten exchanges in the currency circle Apr 22, 2025 pm 01:21 PM

The reliable and easy-to-use virtual currency exchange apps are: 1. Binance, 2. OKX, 3. Gate.io, 4. Coinbase, 5. Kraken, 6. Huobi Global, 7. Bitfinex, 8. KuCoin, 9. Bittrex, 10. Poloniex. These platforms were selected as the best for their transaction volume, user experience and security, and all offer registration, verification, deposit, withdrawal and transaction operations.

What are the free market viewing software websites? Ranking of the top ten free market viewing software in the currency circle What are the free market viewing software websites? Ranking of the top ten free market viewing software in the currency circle Apr 22, 2025 am 10:57 AM

The top three top ten free market viewing software in the currency circle are OKX, Binance and gate.io. 1. OKX provides a simple interface and real-time data, supporting a variety of charts and market analysis. 2. Binance has powerful functions, accurate data, and is suitable for all kinds of traders. 3. gate.io is known for its stability and comprehensiveness, and is suitable for long-term and short-term investors.

The top ten free platform recommendations for real-time data on currency circle markets are released The top ten free platform recommendations for real-time data on currency circle markets are released Apr 22, 2025 am 08:12 AM

Cryptocurrency data platforms suitable for beginners include CoinMarketCap and non-small trumpet. 1. CoinMarketCap provides global real-time price, market value, and trading volume rankings for novice and basic analysis needs. 2. The non-small quotation provides a Chinese-friendly interface, suitable for Chinese users to quickly screen low-risk potential projects.

What are the digital currency trading apps suitable for beginners? Learn about the coin circle in one article What are the digital currency trading apps suitable for beginners? Learn about the coin circle in one article Apr 22, 2025 am 08:45 AM

When choosing a digital currency trading platform suitable for beginners, you need to consider security, ease of use, educational resources and cost transparency: 1. Priority is given to platforms that provide cold storage, two-factor verification and asset insurance; 2. Apps with a simple interface and clear operation are more suitable for beginners; 3. The platform should provide learning tools such as tutorials and market analysis; 4. Pay attention to hidden costs such as transaction fees and cash withdrawal fees.

See all articles