dongshi1868 2011-12-01 22:39
浏览 31
已采纳

php和mysql的行为方式与html和css的div标签相同吗? [关闭]

I know its a bit of a tricky question but like the information about the div tag in the html file is actually in the css file, can you do the same with php and mysql?

I know its had dot understand so heres an example!

So you have:

HTML file: <div class="box"></div>

CSS file: .box {height:20px; width: 20px;}

Then speaking of PHP and MYSQL. If I want to display mysql results on a 'page.php' can I have a 'div' like tag that shows where I want the results to be displayed but have the mysql code actually in another file?

Thanks!

James

  • 写回答

3条回答 默认 最新

  • duanjuebiao6730 2011-12-01 22:44
    关注

    That's certainly a strange way of looking at it.

    I think the concise answer is yes, though it is much easier to think of it without any of that html css talk.

    Look into something like the smarty template system:

    http://www.smarty.net/

    for a way to have logic and output in separate files. Mind you I only refer you to smarty because it is a commonly used package and NOT - I repeat - NOT because I approve of the software.

    Basic understanding of PHP will easily reveal any number of ways to achieve what you speak of here. It's pretty simple.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码