• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getSettingsPath函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getSettingsPath函数的典型用法代码示例。如果您正苦于以下问题:PHP getSettingsPath函数的具体用法?PHP getSettingsPath怎么用?PHP getSettingsPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getSettingsPath函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($name = '')
 {
     $this->dir = getSettingsPath() . $name;
     if (!is_dir($this->dir)) {
         makeDirectory($this->dir);
     }
 }
开发者ID:issarapong,项目名称:ruTorrent,代码行数:7,代码来源:cache.php


示例2: __construct

 public function __construct()
 {
     $this->dir = getSettingsPath() . "/httprpc";
     if (!is_dir($this->dir)) {
         makeDirectory($this->dir);
     }
 }
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:7,代码来源:rpccache.php


示例3: rCache

 public function rCache($name = '')
 {
     $this->dir = getSettingsPath() . $name;
     if (!is_dir($this->dir)) {
         mkdir($this->dir, 0777);
     }
 }
开发者ID:johnymarek,项目名称:eboda-hd-for-all-500,代码行数:7,代码来源:cache.php


示例4: rpcCache

 public function rpcCache()
 {
     $this->dir = getSettingsPath() . "/httprpc";
     if (!is_dir($this->dir)) {
         makeDirectory($this->dir);
     }
 }
开发者ID:RiderAmjith,项目名称:ruTorrent,代码行数:7,代码来源:rpccache.php


示例5: __construct

 public function __construct()
 {
     global $topDirectory;
     $this->datafile = addslash(getSettingsPath()) . 'fileshare.dat';
     $this->check_post($this->postlist);
     $this->load();
     $this->userdir = addslash($topDirectory);
 }
开发者ID:ravenstar,项目名称:rutorrent-essential,代码行数:8,代码来源:share.class.php


示例6: __construct

 public function __construct()
 {
     $pathToDatabase = getSettingsPath() . '/peers.dat';
     @makeDirectory(dirname($pathToDatabase));
     $needCreate = !is_readable($pathToDatabase);
     if ($this->handle = sqlite_open($pathToDatabase, 0666, $this->error)) {
         if ($needCreate) {
             sqlite_exec($this->handle, 'create table comments( ' . 'id integer primary key,' . 'ip text unique,' . 'comment text)', $this->error);
             @chmod($pathToDatabase, 0666);
         }
     }
 }
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:12,代码来源:ip_db.php


示例7: __construct

 public function __construct()
 {
     global $topDirectory;
     eval(getPluginConf('fileupload'));
     $this->services = $services;
     $this->datafile = addslash(getSettingsPath()) . 'fileuploads.dat';
     $this->check_post($this->postlist);
     $this->load();
     $this->userdir = addslash($topDirectory);
     $this->shout = false;
     $this->xmlrpc = new rxmlrpcfix();
     $this->settings = array('tempdir' => '/tmp');
 }
开发者ID:stroebs,项目名称:rutorrent-thirdparty-plugins,代码行数:13,代码来源:fileup.class.php


示例8: findRemoteEXE

function findRemoteEXE($exe, $err, &$remoteRequests)
{
    $st = getSettingsPath() . '/' . rand();
    if (!array_key_exists($exe, $remoteRequests)) {
        $path = realpath(dirname('.'));
        global $pathToExternals;
        $cmd = array("sh", addslash($path) . "test.sh", $exe, $st);
        if (isset($pathToExternals[$exe]) && !empty($pathToExternals[$exe])) {
            $cmd[] = $pathToExternals[$exe];
        }
        $req = new rXMLRPCRequest(new rXMLRPCCommand("execute", $cmd));
        $req->run();
        $remoteRequests[$exe] = array("path" => $st, "err" => array());
    }
    $remoteRequests[$exe]["err"][] = $err;
}
开发者ID:PreK,项目名称:ruTorrent,代码行数:16,代码来源:getplugins.php


示例9: dirname

        exit;
    }
    $name = dirname(__FILE__) . "/labels/" . $label . ".png";
    if (is_readable($name)) {
        sendFile($name, "image/png");
        exit;
    }
}
if (isset($_REQUEST["tracker"])) {
    $tracker = rawurldecode($_REQUEST["tracker"]);
    $name = dirname(__FILE__) . "/trackers/" . $tracker . ".png";
    if (is_readable($name)) {
        sendFile($name, "image/png");
        exit;
    }
    $name = getSettingsPath() . '/trackers';
    if (!is_dir($name)) {
        makeDirectory($name);
    }
    $name .= '/';
    if (strlen($tracker)) {
        $name .= $tracker;
        $name .= '.ico';
        if (!is_readable($name)) {
            $url = Snoopy::linkencode("http://" . $tracker . "/favicon.ico");
            $client = new Snoopy();
            @$client->fetchComplex($url);
            if ($client->status == 200) {
                file_put_contents($name, $client->results);
            }
        }
开发者ID:anthonyryan1,项目名称:ruTorrent,代码行数:31,代码来源:action.php


示例10: videoScreenshots

 public function videoScreenshots($file, $output)
 {
     $fs = Fs::get();
     $video_file = $this->getUserDir($file);
     $screens_file = $this->getUserDir($output);
     if (!$fs->isFile($video_file)) {
         throw new Exception("Error Processing Request", 6);
     } else {
         if ($fs->isFile($screens_file)) {
             throw new Exception("dest is file", 16);
         }
     }
     $defaults = array('scrows' => '12', 'sccols' => 4, 'scwidth' => 300);
     $uisettings = json_decode(file_get_contents(getSettingsPath() . '/uisettings.json'), true);
     $settings = array();
     foreach ($defaults as $k => $value) {
         $settings[$k] = isset($uisettings['webui.fManager.' . $k]) && $uisettings['webui.fManager.' . $k] > 1 ? $uisettings['webui.fManager.' . $k] : $value;
     }
     $vinfo = $this->video_info($video_file);
     $frame_step = floor($vinfo['total_frames'] / ($settings['scrows'] * $settings['sccols']));
     $settings['frame_step'] = $frame_step;
     $temp = Helper::getTempDir();
     $args = array('action' => 'makeScreensheet', 'params' => array('imgfile' => $screens_file, 'file' => $video_file, 'options' => $settings, 'binary' => getExternal('ffmpeg')), 'temp' => $temp);
     $task = $temp['dir'] . 'task';
     file_put_contents($task, json_encode($args));
     $task_opts = array('requester' => 'filemanager', 'name' => 'screensheet');
     $rtask = new \rTask($task_opts);
     $commands = array(Helper::getTaskCmd() . " " . escapeshellarg($task));
     $ret = $rtask->start($commands, 0);
     //   var_dump($ret);
     return $temp;
 }
开发者ID:stroebs,项目名称:rutorrent-thirdparty-plugins,代码行数:32,代码来源:flm.class.php


示例11: getSettingsPath

<?php

require_once 'util.php';
$filename = getSettingsPath() . "/uisettings.json";
if ($w = @fopen($filename, "wb")) {
    if (isset($_REQUEST['v'])) {
        fputs($w, $_REQUEST['v']);
    }
    fclose($w);
}
开发者ID:johnymarek,项目名称:eboda-hd-for-all-500,代码行数:10,代码来源:setsettings.php


示例12: eval

<?php

require_once "chat.php";
eval(getPluginConf("chat"));
$chatDir = getSettingsPath() . "/chat";
if (!file_exists($chatDir) || !is_dir($chatDir)) {
    mkdir($chatDir);
}
$chat = rChat::load();
$chatSettings = $chat->get();
$chatList = array();
$chatList["main_chat"] = array();
$chatList["main_chat"]["newChat"] = file_exists($chatDir . "/main_chat.log.new");
$chatList["main_chat"]["disabled"] = false;
if ($chatSettings["pm"]) {
    $me = getUser();
    $users = scandir($rootPath . "/share/users/");
    if ($users && count($users) > 0) {
        foreach ($users as $user) {
            if ($user[0] == "." || $user == $me) {
                continue;
            }
            $chatList[$user] = array();
            $chatList[$user]["newChat"] = file_exists($chatDir . "/" . $user . ".log.new");
            $chatList[$user]["disabled"] = file_exists($rootPath . "/share/users/" . $user . "/settings/chat/nopm");
        }
    }
}
$jResult .= "plugin.chatList = " . json_encode($chatList) . ";";
$jResult .= "plugin.settings = " . json_encode($chatSettings) . ";";
$jResult .= "plugin.listInterval = " . $defaultListInterval * 1000 . ";";
开发者ID:ravenstar,项目名称:rutorrent-essential,代码行数:31,代码来源:init.php


示例13: array

    } else {
        if ($_REQUEST['tracker'] != "global") {
            $storages = array("trackers/" . $_REQUEST['tracker'] . ".csv");
        }
    }
}
function sum($e1, $e2)
{
    return $e1 + $e2;
}
if (isset($_REQUEST['mode'])) {
    $mode = $_REQUEST['mode'];
    if ($mode == 'clear') {
        if (!$disableClearButton) {
            foreach ($storages as $storage) {
                @unlink(getSettingsPath() . '/trafic/' . $storage);
            }
        }
        if ($_REQUEST['tracker'] != "none") {
            $mode = 'day';
            $storages = array("global.csv");
        }
    }
    $ret = array();
    foreach ($storages as $storage) {
        $st = new rStat($storage);
        if ($mode == 'day') {
            $val = $st->getDay();
        } else {
            if ($mode == 'month') {
                $val = $st->getMonth();
开发者ID:Rapiddot,项目名称:ruTorrent,代码行数:31,代码来源:getdata.php


示例14: getChatList

function getChatList()
{
    global $rootPath;
    $chatDir = getSettingsPath() . "/chat";
    $chatList = array();
    $chatList["main_chat"] = array();
    $chatList["main_chat"]["newChat"] = file_exists($chatDir . "/main_chat.log.new");
    $chatList["main_chat"]["disabled"] = false;
    $me = getUser();
    $users = scandir($rootPath . "/share/users/");
    if ($users && count($users) > 0) {
        foreach ($users as $user) {
            if ($user[0] == "." || $user == $me) {
                continue;
            }
            $chatList[$user] = array();
            $chatList[$user]["newChat"] = file_exists($chatDir . "/" . $user . ".log.new");
            $chatList[$user]["disabled"] = file_exists($rootPath . "/share/users/" . $user . "/settings/chat/nopm");
        }
    }
    return $chatList;
}
开发者ID:ravenstar,项目名称:rutorrent-essential,代码行数:22,代码来源:action.php


示例15: eval

<?php

eval(getPluginConf($plugin["name"]));
require_once '../plugins/trafic/ratios.php';
$st = getSettingsPath();
makeDirectory(array($st . '/trafic', $st . '/trafic/trackers', $st . '/trafic/torrents'));
$req = new rXMLRPCRequest($theSettings->getScheduleCommand("trafic", $updateInterval, getCmd('execute') . '={sh,-c,' . escapeshellarg(getPHP()) . ' ' . escapeshellarg($rootPath . '/plugins/trafic/update.php') . ' ' . escapeshellarg(getUser()) . ' & exit 0}'));
if ($req->run() && !$req->fault) {
    $theSettings->registerPlugin($plugin["name"], $pInfo["perms"]);
} else {
    $jResult .= "plugin.disable(); noty('trafic: '+theUILang.pluginCantStart,'error');";
}
$jResult .= "plugin.collectStatForTorrents = " . ($collectStatForTorrents ? "true;" : "false;");
$jResult .= "plugin.updateInterval = " . $updateInterval . ";";
$jResult .= "plugin.disableClearButton = " . ($disableClearButton ? "true" : "false") . ";";
开发者ID:chaitanya11,项目名称:rtorrent,代码行数:15,代码来源:init.php


示例16: getTrackers

 protected static function getTrackers()
 {
     $files = array();
     $dir = getSettingsPath() . '/trafic/trackers';
     $dh = @opendir($dir);
     if ($dh) {
         while (false !== ($file = readdir($dh))) {
             $path = $dir . '/' . $file;
             if ($file != ".." && $file != "." && is_file($path)) {
                 $files[] = basename($path, ".csv");
             }
         }
     }
     sort($files, SORT_STRING);
     $files = array_map('quoteAndDeslashEachItem', $files);
     return implode(",", $files) . "]}";
 }
开发者ID:chaitanya11,项目名称:rtorrent,代码行数:17,代码来源:stat.php


示例17: header

<?php

require_once 'util.php';
$s = @file_get_contents(getSettingsPath() . "/uisettings.json");
if ($s == false) {
    $s = '{}';
}
if (!ini_get("zlib.output_compression")) {
    header("Content-Length: " . strlen($s));
}
header("Content-Type: application/json; charset=UTF-8");
echo $s;
开发者ID:johnymarek,项目名称:eboda-hd-for-all-500,代码行数:12,代码来源:getsettings.php


示例18: remove

 public static function remove($list)
 {
     $tasks = array();
     $dir = getSettingsPath() . '/tasks/';
     if ($handle = @opendir($dir)) {
         while (false !== ($file = readdir($handle))) {
             if ($file != "." && $file != ".." && is_dir($dir . $file) && in_array($file, $list)) {
                 $tasks[] = $file;
             }
         }
         closedir($handle);
         foreach ($tasks as $id) {
             rTask::kill($id);
         }
         $tasks = self::obtain();
     }
     return $tasks;
 }
开发者ID:Rapiddot,项目名称:ruTorrent,代码行数:18,代码来源:task.php


示例19: getTrackers

 protected static function getTrackers()
 {
     $files = array();
     $dir = getSettingsPath() . '/trafic/trackers';
     $dh = @opendir($dir);
     if ($dh) {
         while (false !== ($file = readdir($dh))) {
             $path = $dir . '/' . $file;
             if ($file != ".." && $file != "." && is_file($path)) {
                 $files[] = basename($path, ".csv");
             }
         }
     }
     sort($files, SORT_STRING);
     return $files;
 }
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:16,代码来源:stat.php


示例20: testRemoteRequests

function testRemoteRequests($remoteRequests)
{
    $jResult = "";
    $st = getSettingsPath() . '/';
    foreach ($remoteRequests as $exe => $errs) {
        $file = $st . $exe . ".founded";
        if (!is_file($file)) {
            foreach ($errs as $err) {
                $jResult .= $err;
            }
        } else {
            @unlink($file);
        }
    }
    return $jResult;
}
开发者ID:johnymarek,项目名称:eboda-hd-for-all-500,代码行数:16,代码来源:getplugins.php



注:本文中的getSettingsPath函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getSettingsValue函数代码示例发布时间:2022-05-15
下一篇:
PHP getSettingsBlockId函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap