Is it possible to write PHP in jade/pug?

前端 未结 5 2222
挽巷
挽巷 2021-02-09 11:37

Is it possible? If so, how? If its not, do I have to abandon pug if I need to write PHP in my documents? After searching around I didnt find anyone that has adressed this.

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-09 11:59

    There is a well-known and well-maintained Pug processor written natively in PHP. You can use it to process your Pug files into HTML, just like the original Pug, with the advantage that it allows you to embed and use PHP code in your Pug file with ease. If you're working with PHP inside Pug, check it out:

    Phug - the Pug template engine for PHP

提交回复
热议问题