Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1821081
sabredav.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
808 B
Subscribers
None
sabredav.php
View Options
<?php
// SabreDAV test server.
class
CliLog
{
protected
$stream
;
function
__construct
()
{
$this
->
stream
=
fopen
(
'php://stdout'
,
'w'
);
}
function
log
(
$msg
)
{
fwrite
(
$this
->
stream
,
$msg
.
"
\n
"
);
}
}
$log
=
new
CliLog
();
if
(
php_sapi_name
()!==
'cli-server'
)
{
die
(
"This script is intended to run on the built-in php webserver"
);
}
// Finding composer
$paths
=
array
(
__DIR__
.
'/../vendor/autoload.php'
,
__DIR__
.
'/../../../autoload.php'
,
);
foreach
(
$paths
as
$path
)
{
if
(
file_exists
(
$path
))
{
include
$path
;
break
;
}
}
use
Sabre\DAV
;
// Root
$root
=
new
DAV\FS\Directory
(
getcwd
());
// Setting up server.
$server
=
new
DAV\Server
(
$root
);
// Browser plugin
$server
->
addPlugin
(
new
DAV\Browser\Plugin
());
$server
->
exec
();
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Dec 23, 2:42 AM (1 d, 58 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914900
Default Alt Text
sabredav.php (808 B)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment