谁遇到过这种php时间函数问题?

来源:百度知道 编辑:UC知道 时间:2024/06/17 05:43:33
首先强调一下,代码是本地测试正常的,
<form action="<?php echo $editFormAction; ?>" method="POST" name="form1" id="form1">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<th>标题</th>
<td><input name="co_subject" type="text" id="co_subject" value="RE:<?php echo $row_RecBlog['blog_title']; ?>" />
<input name="blog_id" type="hidden" id="blog_id" value="<?php echo $row_RecBlog['blog_id']; ?>" />
<input name="co_date" type="text" value="<?php echo date("Y-m-d H:i:s");?>" />
<input name="co_name" type="hidden" id="co_name" value=&q

你写代码都是这么加的时间吗?不需要在提交页面加上提交时间,直接在存到数据库的代码那加上当前时间就可以了

你看看网页源代码是咋回事噻。

你把value后面引号与反斜杠之间价格空格试试,

<?php echo date("Y-m-d H:i:s");?>" />

怎么把php和html写在了一起了,很不好看

<input name="co_date" type="text" value="<?php echo date("Y-m-d H:i:s");?>" />
上面的双引号冲突了,改为:
<input name="co_date" type="text" value="<?php echo date('Y-m-d H:i:s');?>" />

<input name="co_date" type="text" value="<?php echo date("Y-m-d H:i:s");?>" />
上面的双引号冲突了,改为:
<input name="co_date" type="text" value="<?php echo date('Y-m-d H:i:s');?>" />
这应该是对的