2012-07-08 165 views
0

在PHP中,我有一个表格,用户可以通过点击一个按钮在PHP从文件夹访问文件

echo "<td> <form action=\"viewComments.php?id=$pid\" method=\"post\">"; 

这工作得很好,当我把viewComments.php在同一个文件夹中查看评论。我想组织我的代码,并把viewComments.php放在一个文件夹中让我们说“行动”。我该怎么做呢?换句话说,如果我想访问名为“操作”的文件夹中的“viewComments.php”如何在这里反映出来? echo“”; 有人可以帮忙吗?

我有 blog_created/thisScript.php - 在这里我有我的代码和我的viewComments.php是在blog_created/actions/viewComments.php ...它不工作....它说 - 请求的URL /在这个服务器上找不到〜user/blog_created/viewComments.php

+0

只需在'viewComments.php'前添加'actions /'? – Styxxy 2012-07-08 20:42:57

回答

1
echo "<td> <form action=\"actions/viewComments.php?id=$pid\" method=\"post\">"; 

这是想要你实现吗?

+0

是的!这工作没有错误...但没有得到显示在页面中... – user1479431 2012-07-08 20:50:22

+0

Thanks.that工作 – user1479431 2012-07-08 20:52:31