Help us understand the problem. What is going on with this article?

sabre/dav

インストール

composer require sabre/dav
# データの保存場所
mkdir -p /home/share/webdav/
chmod 700 /home/share/webdav/
# lockファイル用
mkdir data

利用方法

/webdav/server.php
<?php
use Sabre\DAV;

require 'vendor/autoload.php';

// データ保管場所の設定。DocumentRootは避ける
$rootDirectory = new DAV\FS\Directory('/home/share/webdav/');
$server = new DAV\Server($rootDirectory);

// このスクリプトのURI
$server->setBaseUri('/webdav/server.php');

$lockBackend = new DAV\Locks\Backend\File('data/locks');
$lockPlugin = new DAV\Locks\Plugin($lockBackend);
$server->addPlugin($lockPlugin);

$server->addPlugin(new DAV\Browser\Plugin());

$server->exec();

アクセス

explorerで https://ドメイン名/webdav/server.php にアクセスすると
/home/share/webdav/が読み書きできることを確認。

認証

後で書く

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away