mirror of
https://github.com/kd2org/picodav.git
synced 2024-12-22 13:42:14 +01:00
First commit
FossilOrigin-Name: c3ed52616cdce031b93441dfe50e91ccc35aa8c10c9293872f88ab50d101e1fa
This commit is contained in:
parent
ce878f0fb9
commit
a034cc2738
3 changed files with 4794 additions and 0 deletions
25
make.php
Normal file
25
make.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
$out = fopen('index.php', 'w');
|
||||
|
||||
$php = file_get_contents('server.php');
|
||||
$php = strtr($php, [
|
||||
'__JS_SIZE__' => filesize('webdav.js'),
|
||||
'__CSS_SIZE__' => filesize('webdav.css'),
|
||||
]);
|
||||
|
||||
$php = preg_replace('/\}\s*$/', "\n?>\n", $php);
|
||||
$end = "\n\n<?php } ?>\n";
|
||||
|
||||
$size = strlen($php);
|
||||
$count = substr_count($php, '__PHP_SIZE__');
|
||||
$size -= strlen('__PHP_SIZE__') * $count;
|
||||
$size += strlen((string) $size) * $count;
|
||||
|
||||
$php = str_replace('__PHP_SIZE__', $size, $php);
|
||||
|
||||
fwrite($out, $php);
|
||||
fwrite($out, file_get_contents('webdav.js'));
|
||||
fwrite($out, file_get_contents('webdav.css'));
|
||||
fwrite($out, $end);
|
||||
fclose($out);
|
1792
server.php
Normal file
1792
server.php
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue