CURL would generally be better to use, but it might not exist.
fopen is more available, but http/URL usage may be blocked by config.
Relevant lines:
$targetFile = @fopen($targetUrl, 'rb');
| |
if ($targetFile === false) {
| |
throw new CommandError("Failed to download ZIP file from $targetUrl");
| |
}
|
Based on input from Ionys320: https://github.com/BookStackApp/BookStack/issues/5538#issuecomment-3819764070
]]>Think it's tested enough for this process to be used in other parts of the CLI to be more efficient.
]]> $contents = "[client]\nuser={$this->user}\nhost={$this->host}\nport={$this->port}\npassword={$this->password}\nprotocol=TCP";
|