在一个html文件中,想调用abc.php文件,并且把当前日期date和format这两个参数传递过去,程序如下:
<a href="abc.php?date=<?=(date("Y-m-d"))?>&format=1" target="_blank"><u>当天记录</u></a>
可是上面的语句不能解析当前<? * ?>中的内容,我的php设置中已经开启了短标记,请问要实现这个功能该怎么做?
<a href="abc.php?date=<?=(date("Y-m-d"))?>&format=1" target="_blank"><u>当天记录</u></a>
可是上面的语句不能解析当前<? * ?>中的内容,我的php设置中已经开启了短标记,请问要实现这个功能该怎么做?
换成.php后,还要把<a href="abc.php?date= <?=(date("Y-m-d"))?>&format=1" target="_blank"> <u>当天记录 </u> </a>
改成
<a href="abc.php?date= <? echo (date("Y-m-d"))?>&format=1" target="_blank"> <u>当天记录 </u> </a>
楼主要更让html 也能跑php可以在apache 里面设置一下,好像是application-xxxx什么的,后面有php 再加个html 就可以了。具体问题,看楼主的需求了。