简体   繁体   中英

FWRITE() Saving file to a specific location using XAMPP

I realize there are similar questions but only regarding saving files on Linux servers or external windows servers. I have a script on my local machine (running XAMPP) under the C:/ drive. Once the script is run, I would like to save the file to the Z:/ drive on my computer network but am unable to make this happen.

is it possible to have the script run from say:

C:\\xampp\\htdocs\\folder\\script.php

and save that .pdf file generated sent to:

Z:\\Foldername2

EDIT

While I am able to run the script and store the file anywhere on my C drive, my issue is placing on a network shared drive (the Z drive). When run, I get the following error:

Warning: fopen(Z:\\form.pdf) [function.fopen]: failed to open stream: No such file or directory in C:\\xampp\\htdocs\\folder\\fpdf\\fpdf.php on line 1157 FPDF error: Unable to create output file: Z:\\form.pdf

假设目录是可写的,那么您应该能够在输出方法中使用F选项。

最简单的方法是在指向该位置的Web目录中放置一个快捷方式,然后确保权限允许RW访问

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM