Файловый менеджер - Редактировать - /home/avadvi5/calendar.aeronextgen.com/fileserver.php
Ðазад
<?php /* This is the best starting point if you're just interested in setting up a fileserver. Make sure that the 'enterprise' and 'tmpdata' exists, with write permissions for your server. */ // settings date_default_timezone_set('UTC'); $publicDir = 'enterprise'; $tmpDir = 'tmpdata'; // If you want to run the SabreDAV server in a custom location (using mod_rewrite for instance) // You can override the baseUri here. $baseUri = '/fileserver.php'; // Files we need require_once 'vendor/autoload.php'; /** * Database * * Feel free to switch this to MySQL, it will definitely be better for higher * concurrency. */ $pdo = new PDO('mysql:dbname=avadvi5_sabredav;host=calendar.aeronextgen.com', 'avadvi5_calendar', '(PEIHTvbWl;V'); // Throwing exceptions when PDO comes across an error: $pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); // Create the root node $root = new \Sabre\DAV\FS\Directory($publicDir); // The rootnode needs in turn to be passed to the server class $server = new \Sabre\DAV\Server($root); if (isset($baseUri)) $server->setBaseUri($baseUri); // Support for LOCK and UNLOCK $lockBackend = new \Sabre\DAV\Locks\Backend\File($tmpDir . '/locksdb'); $lockPlugin = new \Sabre\DAV\Locks\Plugin($lockBackend); $server->addPlugin($lockPlugin); // Support for html frontend $browser = new \Sabre\DAV\Browser\Plugin(); $server->addPlugin($browser); // Automatically guess (some) contenttypes, based on extesion $server->addPlugin(new \Sabre\DAV\Browser\GuessContentType()); /** * The .htdigest backend */ /// use Sabre\DAV\Auth; /// $authBackend = new Auth\Backend\File('/.htdigest'); /// $authBackend->setRealm('SabreDAV'); // Creating the plugin. /// $authPlugin = new Auth\Plugin($authBackend); // Adding the plugin to the server. /// $server->addPlugin($authPlugin); /** * The PDO backend */ /// use Sabre\DAV\Auth; $authBackend = new \Sabre\DAV\Auth\Backend\PDO($pdo); $authBackend->setRealm('SabreDAV'); // Creating the plugin. $authPlugin = new \Sabre\DAV\Auth\Plugin($authBackend); // Adding the plugin to the server. $server->addPlugin($authPlugin); // Temporary file filter $tempFF = new \Sabre\DAV\TemporaryFileFilterPlugin($tmpDir); $server->addPlugin($tempFF); // And off we go! $server->exec();
| ver. 1.1 | |
.
| PHP 8.3.30 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка