生成的二维码未存储在给定的路径中
QRcode generated not storing in the path given
使用 SimpleSoftwareIO/simple-qrcode,我正在尝试生成 QRCode 并存储它。
\QrCode::generate($reservation_id, '/assets/uploads/'.$reservation_id.'.svg');
其中returns以下错误,
"file_put_contents(/assets/uploads/15525609678807.svg): failed to open stream: No such file or directory",
"exception": "ErrorException",
"file": "/..../vendor/simplesoftwareio/simple-qrcode/src/SimpleSoftwareIO/QrCode/BaconQrCodeGenerator.php",
"line": 85,
有效,
\QrCode::generate($reservation_id, base_path().$reservation_id.'.svg');
使用 SimpleSoftwareIO/simple-qrcode,我正在尝试生成 QRCode 并存储它。
\QrCode::generate($reservation_id, '/assets/uploads/'.$reservation_id.'.svg');
其中returns以下错误,
"file_put_contents(/assets/uploads/15525609678807.svg): failed to open stream: No such file or directory",
"exception": "ErrorException",
"file": "/..../vendor/simplesoftwareio/simple-qrcode/src/SimpleSoftwareIO/QrCode/BaconQrCodeGenerator.php",
"line": 85,
有效,
\QrCode::generate($reservation_id, base_path().$reservation_id.'.svg');