|
Server : Apache System : Linux vps.urbanovitalino.adv.br 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 User : urbanovitalinoad ( 1001) PHP Version : 7.3.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/urbanovitalinoad/public_html/servicedesk/vendor/sabre/dav/bin/ |
Upload File : |
<?php
// SabreDAV test server.
class CliLog
{
protected $stream;
public function __construct()
{
$this->stream = fopen('php://stdout', 'w');
}
public function log($msg)
{
fwrite($this->stream, $msg."\n");
}
}
$log = new CliLog();
if ('cli-server' !== php_sapi_name()) {
die('This script is intended to run on the built-in php webserver');
}
// Finding composer
$paths = [
__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();