2012-07-08 162 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