我遵循的步骤是:
在这里,它使用文件协议打开。无法在预期中打开- 'http ://mydomain/sabredav/server.php -‘有人能在这方面帮助我吗?
谢谢
发布于 2014-05-16 14:10:45
在server.php中,使用浏览器插件tu查看公用文件夹中的文件。您的服务器必须像这样:
include 'SabreDAV/vendor/autoload.php';
use
Sabre\DAV;
$rootDirectory = new DAV\FS\Directory('public');
// The server object is responsible for making sense out of the WebDAV protocol
$server = new DAV\Server($rootDirectory);
// If your server is not on your webroot, make sure the following line has the correct information
$server->setBaseUri('/server.php'); // if its in some kind of home directory
// The lock manager is reponsible for making sure users don't overwrite each others changes. Change 'data' to a different
// directory, if you're storing your data somewhere else.
$lockBackend = new DAV\Locks\Backend\File('data/locks');
$lockPlugin = new DAV\Locks\Plugin($lockBackend);
$server->addPlugin($lockPlugin);
$server->addPlugin(new \Sabre\DAV\Browser\GuessContentType());
$plugin = new \Sabre\DAV\Browser\Plugin();
$server->addPlugin($plugin);
// All we need to do now, is to fire up the server
$server->exec();https://stackoverflow.com/questions/22967406
复制相似问题