[英]How to pass variable into file path ini php
I am trying to pass $namefile into a path download.我正在尝试将 $namefile 传递到路径下载中。 how to do it?
怎么做?
public function download($namefile)
{
return $this->response->download("pathfile/[here]", null);
}
i'm using label to download the file我正在使用 label 下载文件
<label>File <a href="/suratmasuk/download/<?= $surat['file']; ?>"><sup>Download</sup></a></label>
Are you trying to download a file using button?您是否尝试使用按钮下载文件? If yes, why don't you use
<?php base_url()/[file location]?>
inside your button href?如果是,为什么不在按钮 href 中使用
<?php base_url()/[file location]?>
?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.