tw4ld6 发表于 2024-10-3 05:38:01

EMLOG让文案日期暗示仔细时间和星期的办法


    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">emlog程序既然是博客程序,<span style="color: black;">然则</span>在<span style="color: black;">文案</span>发布之后不仅<span style="color: black;">无</span><span style="color: black;">详细</span>的时间和星期,<span style="color: black;">乃至</span>连基本的年月日都<span style="color: black;">无</span><span style="color: black;">表示</span>,<span style="color: black;">那样</span>有<span style="color: black;">无</span>什么<span style="color: black;">办法</span><span style="color: black;">能够</span>让emlog博客程序里发布的<span style="color: black;">文案</span><span style="color: black;">表示</span>是就<span style="color: black;">详细</span>时间和星期呢?这个是<span style="color: black;">能够</span>实现的,只要<span style="color: black;">咱们</span>在emlog博客程序的模板中进行<span style="color: black;">有些</span>修改就<span style="color: black;">能够</span>了,下面就来<span style="color: black;">仔细</span>的介绍一下<span style="color: black;">怎样</span>让emlog博客程序里的<span style="color: black;">文案</span><span style="color: black;">表示</span>出<span style="color: black;">详细</span>的时间日期和星期。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这款程序的默认首页文件是log_list.php文件,<span style="color: black;">首要</span><span style="color: black;">咱们</span>要在网站程序中找打这个文件,<span style="color: black;">而后</span>用网页编辑工具将其打开,先在里面找到下面的这一行代码:</p><span style="color: black;"><span style="color: black;">&lt;?php</span> <span style="color: black;">echo</span> gmdate(<span style="color: black;">Y-n-j</span>, $value[<span style="color: black;">date</span>]); <span style="color: black;">?&gt;</span></span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>把这行代码进行替换,替换成这一段代码:</p><span style="color: black;"><span style="color: black;">&lt;?php</span> $weekarray=<span style="color: black;">array</span>(<span style="color: black;">"日"</span>,<span style="color: black;">"一"</span>,<span style="color: black;">"二"</span>,<span style="color: black;">"三"</span>,<span style="color: black;">"四"</span>,<span style="color: black;">"五"</span>,<span style="color: black;">"六"</span>);<span style="color: black;">echo</span> gmdate(<span style="color: black;">Y年n月j日 G:i</span>, $value[<span style="color: black;">date</span>]);<span style="color: black;">echo</span><span style="color: black;">" 星期"</span>.$weekarray)];<span style="color: black;">?&gt;</span></span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">而<span style="color: black;">倘若</span>需要在内容页<span style="color: black;">表示</span>的话则需要修改另一个文件echo_log.php,打开之后找到下面的这一行代码:</p><span style="color: black;"><span style="color: black;">&lt;?php</span> <span style="color: black;">echo</span> gmdate(<span style="color: black;">Y-n-j</span>, $date); <span style="color: black;">?&gt;</span></span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">将其替换成:</p><span style="color: black;"><span style="color: black;">&lt;?php</span> $weekarray=<span style="color: black;">array</span>(<span style="color: black;">"日"</span>,<span style="color: black;">"一"</span>,<span style="color: black;">"二"</span>,<span style="color: black;">"三"</span>,<span style="color: black;">"四"</span>,<span style="color: black;">"五"</span>,<span style="color: black;">"六"</span>);<span style="color: black;">echo</span> gmdate(<span style="color: black;">Y年n月j日 G:i</span>, $date);<span style="color: black;">echo</span> <span style="color: black;">" 星期"</span>.$weekarray;<span style="color: black;">?&gt;</span></span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">最后<span style="color: black;">保留</span>文件,登入网站后台刷新一下数据缓存就<span style="color: black;">能够</span>了。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">本教程由帝通科技原创,转账请注明出处:http://www.ddv.cn/?zpl</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3aa000cdbf407c20018~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728086565&amp;x-signature=bdScWF6NTdFGasUhENZbKzXrzXA%3D" style="width: 50%; margin-bottom: 20px;"></p>




7wu1wm0 发表于 2024-10-24 23:15:14

顶楼主,说得太好了!

7wu1wm0 发表于 2024-11-3 15:35:39

软文发布平台 http://www.fok120.com/

wrjc1hod 发表于 7 天前

对于这个问题,我有不同的看法...
页: [1]
查看完整版本: EMLOG让文案日期暗示仔细时间和星期的办法