dsdvr06648 2013-10-24 16:50
浏览 91

使用PHP和MySQL自定义模板标签

Let's say i'm creating a blog platform where users can edit their template with HTML tags, would it be possible doing something like the following code?

<links>
 <a href="<%LinkUrl%>"><%Link%></a>
 <a href="<%LinkUrl%>"><%Link%></a>
</links>

To manage that, how should I proceed? Is there a easy way to do this? I have looked at Smarty template engine, but that is way too difficult for a user without much experience of programming. Other solutions avaliable for this purpose?

It would be interesting if someone could give me a briefing on how I could create something similiar. Not looking for finished code in any way - just some help getting started.

  • 写回答

1条回答

  • drby30217 2013-10-24 16:55
    关注

    Try to work yourself into regular expressions. You can achieve what you want with them.

    Tutorial

    preg_replace() manual

    评论

报告相同问题?

悬赏问题

  • ¥15 用C语言输入方程怎么
  • ¥15 网站显示不安全连接问题
  • ¥15 github训练的模型参数无法下载
  • ¥15 51单片机显示器问题
  • ¥20 关于#qt#的问题:Qt代码的移植问题
  • ¥50 求图像处理的matlab方案
  • ¥50 winform中使用edge的Kiosk模式
  • ¥15 关于#python#的问题:功能监听网页
  • ¥15 怎么让wx群机器人发送音乐
  • ¥15 fesafe材料库问题