【发布时间】:2014-10-16 19:38:06
【问题描述】:
我有一个问题,不明白为什么会出现这个错误,我在本地服务器上运行页面,当我尝试访问文件时出现这个错误,但是如果你和我一起运行它 sn-p在此页面上显示如何。
<html>
<head>
<title>Ingresa Un Nuevo Articulo</title>
</head>
<body>
<form method="post" action="insert_post.php" enctype="multipart/form-data">
<table width="600" align="center" border="10">
<tr>
<td align="center" bgcolor="yellow" colspan="6"><h1>Ingresa Un Nuevo Articulo Aqui</h1></td>
</tr>
<tr>
<td align="right">Titulo Del Articulo</td>
<td><input type="text" name="title" size="30"></td>
</tr>
<tr>
<td align="right">Autor Del articulo</td>
<td><input type="text" name="author" size="30"></td>
</tr>
<tr>
<td align="right">Keywords Del articulo</td>
<td><input type="text" name="keywords" size="30"></td>
</tr>
<tr>
<td align="right">Imagen Del articulo</td>
<td><input type="file" name="image"></td>
</tr>
<tr>
<td align="right">Contenido Del Articulo</td>
<td><textarea name="content" cols="30" rows="15"></textarea></td>
</tr>
<tr>
<td align="center" colspan="6"><input type="submit" name="submit" value="Enviar Noticia"></td>
</tr>
</table>
</form>
</body>
</html>
<?php
include("includes/connect.php")
if(isset($_POST['submit'])){
echo $_post_title = $_POST['title'];
echo $_post_date = date('d-m-y');
echo $_post_author = $_POST['author'];
echo $_post_keywords = $_POST['keywords'];
echo $_post_content = $_POST['content'];
echo $_post_image = $_POST['image']['name'];
}
【问题讨论】:
标签: php if-statement syntax