php 如何宏定义,php – 在html中实现宏定义的方法
生活随笔
收集整理的這篇文章主要介紹了
php 如何宏定义,php – 在html中实现宏定义的方法
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
也許顯而易見,但C預處理器可以完成這項工作.
index._html
#define _em(a) a
#define _image(a, b)
#define _list(a, b, c)
a
\- \
- b \
- c \
#define _theTile The Bar Title
#include "head._html"
_list(foo, bar, bean)
This is really _em(great)
_image(media/cat.jpg, )
_image(media/dog.jpg, width="25%" height="10px")
是head._html
_theTile然后,
cpp -P index._html > index.html
生產(chǎn):
The Bar Titlefoo
- bar
- bean
This is really great
總結(jié)
以上是生活随笔為你收集整理的php 如何宏定义,php – 在html中实现宏定义的方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 燃油泵多少钱啊?
- 下一篇: php oracle 配置,关于php: