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条)

报告相同问题?

悬赏问题

  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 yolov8边框坐标
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真