![]() |
| ||
| User configurable php preprocessor and generator - is there any??? Hi, I am looking for a free tool which let me write pure html + user defined special tags, which would be transformed on demand into php file. For example I can define source like this: <html><body> result would be <html><body> is there such a tool??? |
| ||
| Re: User configurable php preprocessor and generator - is there any??? Actually your "pure html" example looks almost identical to ColdFusion from Adobe or, similarly, Genshi in Python. |
| ||
| Re: User configurable php preprocessor and generator - is there any??? Quote:
|
| ||
| Re: User configurable php preprocessor and generator - is there any??? Half of programming is learning to be an able toolsmith. :) If no such tool exists, you'll have to make your own, perhaps using a pair of existing tools: sed and m4:[list][*]sed() transforms the input to a form m4() can understand[*]m4() 'replaces' the macros with suitable PHP code. But then, isn't an SGML/XML processor is supposed to be able to handle this? If so, then if your input looked more like: <html><body> then an XML processor should be able to produce the desired output. Here, <php_init_sql> is defined to output PHP code that handles the stuff done once-only in a PHP program (require-onces, includes, et al), including sql startup. <gen_select_sql> generates PHP code, that queries the DB and produces the complete <select>...</select>. I think it all comes down to figuring out what you really want to accomplish. After that, it becomes straightforward and clear. Shoot, if the input is 'clean' enough, you could write shell scripts, awk scripts, perl scripts, sed scripts, even ex scripts to process it. |
| All times are GMT -4. The time now is 1:31 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC