【问题标题】:Using the HTML Helper For Code Igniter使用 HTML Helper 表单 Codeigniter
【发布时间】:2011-10-17 16:26:27
【问题描述】:

我有几个关于代码点火器网站上的 HTML Helper 的问题。

http://codeigniter.com/user_guide/helpers/html_helper.html

它显示了您可以在哪里回显文档类型,但我的想法是您必须为头标签、正文标签和标题标签执行手动 html 代码,但它具有元标签。

那么这样做有什么意义呢?

<?php echo doctype(); ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <?php 
    echo meta('description', 'My Great site'); 
    echo meta('Content-type', 'text/html; charset=utf-8', 'equiv');  
    ?>
</head>
<body>

</body>
</html>

【问题讨论】:

标签: codeigniter


【解决方案1】:

在模型中,将这些元标记弹出到一个数组中并将其发送到您的视图。然后用foreach输出你的meta标签,wha-la多行meta变成一行php,你的meta标签就可以在你的模型中轻松编辑了。

【讨论】:

    猜你喜欢
    • 2012-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多