如何更改mPDF输出的根文件夹()?

时间:2017-07-27 19:08:15

标签: php mpdf

如何更改mPDF Output()的根文件夹?

我需要一个从变量中获取的文件名,文件应该保存在名为" / files"的文件夹中。文件的位置应该在$location =("/location")等变量中。

现在我的输出正在根文件夹中生成。

$sql=mysql_query("SELECT * FROM `client_details` ORDER BY `c_id` DESC LIMIT 1");  

while($data = mysql_fetch_array($sql))   
{ 
    $name=$data['name'];
}

$name_p = $name."-estimation.pdf";
$mpdf->Output($name_p,'F');

2 个答案:

答案 0 :(得分:1)

$mpdf->Output("/absolute/path/to/directory/" . $name_p,'F');

$mpdf->Output("relative/path/to/directory/" . $name_p,'F');

答案 1 :(得分:0)

df1 %<-% my_function(df[1:7, ], df1)
df2 %<-% my_function(df = df[(8 - moving_window_days):14, ], df2) # But from here on out, go back 4 days to include that data in the moving average calculation.
df3 %<-% my_function(df = df[(15 - moving_window_days):20, ], df3)