z*q 发帖数: 16 | 1 我用php编写login的网页, 用户正确login后就能进入要下载文件link的网页. 可是当我
直接在URL输入要下载文件的网址时就可下载文件而不需要经过Login.
请教如何才能用php使用户必须login后才能下载文件?谢谢. | g******d 发帖数: 157 | 2 Use "session" or cookie to track the user, such that only the users who passed
the login page can access the download page.
我
【在 z*q 的大作中提到】 : 我用php编写login的网页, 用户正确login后就能进入要下载文件link的网页. 可是当我 : 直接在URL输入要下载文件的网址时就可下载文件而不需要经过Login. : 请教如何才能用php使用户必须login后才能下载文件?谢谢.
| n*******d 发帖数: 650 | 3 one simple solution: use include() to show ur protected file to logged in
users [hide your protected file well]
if (login)
{include ('file.php');
else
{include('logfail.php');
this is not the best way to do it though. hehe.
当 |
|