duanjing4667 2013-06-22 21:35
浏览 9

在刷新时生成新的目录字符串

Basically what I want to do is have my chosen directory change it's string every refresh. I was able to achieve a new download file string on refresh with a script while using MYSQL, but I have no idea how a new directory string would work.

Is anyone able to lead me into the right direction? What would I need to include.

Thanks, here's the scripts for the new download file string:

Download.php:

http://pastebin.com/TPvbWfCA

Index.php:

http://pastebin.com/b6LyPx0y

sql.sql:

CREATE TABLE downloads (
    downloadkey varchar(32) NOT NULL unique,
    file varchar(255) NOT NULL default '',
    downloads int UNSIGNED NOT NULL default '0',
    expires int UNSIGNED NOT NULL default '0'
);
  • 写回答

1条回答 默认 最新

  • doumo0206 2013-06-23 11:06
    关注

    As far as I can tell you followed this guide: http://www.webvamp.co.uk/blog/coding/creating-one-time-download-links/

    You don't need special directories if you want to do that, because the key is appended as a get argument. But if you want it like that /downloads/somekey you can use Apache mod_rewrite to rewrite all URLs that begin with /download/* to download.php Have a look at the Google results for mod_rewrite for guides to do that.

    评论

报告相同问题?

悬赏问题

  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数