Như vấn đề
HỏiXin hàm php lấy ngày upload của file
code lấy ngày upload file
filemtime($filepath)
đúng rùi =));
vd 'image/favicon.ico'
Vậy khai báo thế này đúng không?
<?php $filepath=$_FILES['uploadFile']['tmp_name']; $date_time=filemtime($filepath); echo'Ngày upload:'.$date_time.'<br>'; ?>
=)) cái này khi upload lên rùi có căn cứ $_FILES nữa đâu
echo 'Ngày upload:'.filetime('image/favicon.ico').'<br>';
Anh xem,xem lỗi chỗ nào thế,:3
Ô1
{% if message_list=="" or message_list==null %}<br>{%if api.user_id==api.r.get('uid')%}<im gsrc="http://chimbuom.us /files/885341/muadat.png"/>
{% if api.r.get("uid")==api.user_id %}<br/><form action="main.php?id=ch_topic_h&uid=235823&uuid=[user_id]&back_url=%2Fuser_info.php%3Fuid%3D[user_id]%26view%3Dcharacter"style="display:inline"method="post"><input type="hidden"name="text"value="bare_land"/><small><input type="submit"class="nobutton"value="Mua"style="background:none;border:none;margin:0;padding:0;box-shadow:none;text-shadow:none;cursor:pointer;color:#ffcc33"/></form></small>{% endif %}
{%endif%}{%else%} {{message_list}}{%endif%}
Ô2
{# Tính thời gian trồng cây #}{% set time,date=message_date|split(" ")[1],message_date|split(" ")[0] %}{% set s,m,h,d,mo,y=time|split(":")[2],time|split(":")[1],time|split(":")[0],date|split("-")[2],date|split("-")[1],date|split("-")[0] %}{% set htg=post.published_at|date_modify("- "~y~" years - "~(mo-1)~" months - "~(d-1)~" days - "~h~" hours - "~m~" minutes - "~s~" seconds")|date("H:i:s d/m/Y") %}{% set atime,adate=htg|split(" ")[0],htg|split(" ")[1] %}{% set as,am,ah,ad,amo,ay=atime|split(":")[2],atime|split(":")[1],atime|split(":")[0],adate|split("/")[0],adate|split("/")[1],adate|split("/")[2] %}{% if ad < 2 and amo < 2 and ay < 1 %}{% set ktg = as am*60 ah*3600 %}{% set tl=10800-ktg %}{% else %}{% set ktg =999999 %}{% endif %}{# Ô đất trống #}{% if message=="bare_land" %}{% if api.r.get("uid")==api.user_id %}{# chính chủ #} <a href="/main.php?f=3553162&farm_id=235823&p=1"title="Trồng cây"><img src="/files/885341/{{message}}.png"alt="Ô 1"/></a><br/>{% if api.r.get("farm_id")=="22004"%}{%else%} {%endif%} {%else%} {# Khách cmnr #}
<img src="http://chimbuom.us/files/885341/{{message}}.png"alt="Ô 1"/>
{%endif%}{% endif %}{# Hiện ô đất, tên cây #}{% if ktg < 10800 and message!="bare_land" %}{% if message=="lua" %}
<img src="http://chimbuom.us/files/885341/lua.jpg"/>{% endif %}{% if message=="hoa" %}<img src="http://chimbuom.us/files/885341/hoachua.jpg"/>{% endif %}{% if message=="khom" %}<img src="http://chimbuom.us/files/885341/khomchua.jpg"/>{% endif %}{% if message=="carot" %}<img src="http://chimbuom.us/files/885341/carotchua.jpg"/> {% endif %}{% if message=="tomato" %}<img src="http://chimbuom.us/files/885341 /1-uong.png"/>{% endif %}
{% if message=="thanhlong" %}<img src="http://chimbuom.us/files/885341/thanhlongchua.png"/>{% endif %}{% if message=="dualeo" %}<img src="http://chimbuom.us/files/885341/dualeochua.png" />{% endif %}{% if message=="dualeo" %}<img src="http://chimbuom.us/files/885341/dualeochua.png"/>{% endif %}{% if message=="bap" %}<img src="http://chimbuom.us/files/885341/bapchua.png"/>{% endif %}{% if message=="catim" %}<img src="http://chimbuom.us/files/885341/catimchua.png"/> {% endif %}{% if message=="xoai" %}<img src="http://chimbuom.us/files/885341/xoaichua.png"/>{% endif %}{# Thời gian còn lại #}{% autoescape false %}{{'<br/><small>[<font color="yellow">'~(tl//3600)~'h'~((tl-(tl//3600)*3600)//60)~'</font>]</small>'}} {% endautoescape %}{% endif %}{# Thu hoạch #}{% if (message=="khom" or message=="lua" or message=="hoa" or message=="carot" or message=="tomato" or message=="thanhlong" or message=="dualeo" or message=="bap" or message=="catim" or message=="xoai") and (ktg >= 10800) and (ktg < 21600) %}{% if api.r.get("uid")==api.user_id %}{# Chính cmn chủ #}<form action="main.php?id=ch_topic_h&uid=235823&uuid=[user_id]&back_url=%2Fmain.php%3Ff%3D3553164"style="display:inline"method="post"><input type="hidden"name="text"value="bare_land"/><input type="image"src="http://chimbuom.us/files/885341/{{message}}.png"alt="Thu"class="left4"></form><br/>
{%else%} {# Khách cmn rồi #}
<img src="http://chimbuom.us/files/885341/{{message}}.png"alt="Thu"width="32"height="32"/><br/>
{% endif %}{% endif %}{# Cây chết #}{%if ktg >21600 and message!="bare_land" %}{% if api.r.get("uid")==api.user_id %}{# Chính cmn chủ #} <a href="/main.php?f=3553162&farm_id=235823&p=1"title="Trồng cây"><br><img src="http://isharecode.wapego.net/files/154586/eggplant.png"width="20"height="20"></a>{%else%}{# Khách #}<br><img src="http://isharecode.wapego.net/files/154586 /eggplant.png"width="20"height="20">{%endif%}<br><small>[<font color="ffcc00">chết</font>]</small>{% endif %}
code của chú ken, ko biết dụng chạm chỉnh sửa chỗ nào =))