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

PHP getName函数代码示例

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

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



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

示例1: randName

function randName()
{
    $page = file_get_contents("http://www.behindthename.com/random/random.php?number=3&gender=both&surname=&all=yes");
    preg_match_all('/<a class=\\"plain\\" href="([^.])*\\">([^.])*<\\/a>/', $page, $names);
    $name = getName($names[0][0], '">', '</a>');
    return implode(" ", $name);
}
开发者ID:girudatsu,项目名称:girudatsu-ui,代码行数:7,代码来源:helper.php


示例2: createNpc

function createNpc()
{
    $trait_table = "npc_traits";
    $table = "npc";
    $columns = getColumnNames($table);
    if (empty($_POST["sex"])) {
        $_POST["sex"] = getGender();
    }
    if (empty($_POST["weight"])) {
        $_POST["weight"] = getWeight();
    }
    if (empty($_POST["feet"]) || empty($_POST["inches"])) {
        $_POST["height"] = getHeight();
    } else {
        $_POST["height"] = $_POST["feet"] * 12 + $_POST["inches"];
    }
    if (empty($_POST["age"])) {
        $_POST["age"] = getAge();
    }
    if (empty($_POST["first_name"])) {
        $_POST["first_name"] = getName();
    }
    // will add the remaining traits not already added
    foreach ($columns as $column) {
        if (empty($_POST[$column])) {
            $_POST[$column] = getTrait($trait_table, $column);
        }
    }
}
开发者ID:Cassioblu55,项目名称:aesop_php,代码行数:29,代码来源:npc.php


示例3: __invoke

 public function __invoke()
 {
     $today = $this->getDateInThePast(0);
     $oneWeekAgo = $this->getDateInThePast(7);
     $twoWeeksAgo = $this->getDateInThePast(14);
     $threeWeeksAgo = $this->getDateInThePast(21);
     $service = $this->adwords->getService('AdGroupService');
     $selector = new \Selector();
     $selector->predicates = [new \Predicate('Status', 'EQUALS', 'ENABLED'), new \Predicate('CampaignStatus', 'EQUALS', 'ENABLED')];
     $selector->orderBy = new \OrderBy('ctr', 'ASCENDING');
     $selector->paging = new \Paging(0, \AdWordsConstants::RECOMMENDED_PAGE_SIZE);
     do {
         $page = $service->get($selector);
         if (is_array($page->entries)) {
             foreach ($page->entries as $adGroup) {
                 // Let's look at the trend of the ad group's CTR.
                 $statsThreeWeeksAgo = $this->getStatsFor($adGroup, $threeWeeksAgo, $twoWeeksAgo);
                 $statsTwoWeeksAgo = $this->getStatsFor($adGroup, $twoWeeksAgo, $oneWeekAgo);
                 $statsLastWeek = $this->getStatsFor($adGroup, $oneWeekAgo, $today);
                 // Week over week, the ad group is declining - record that!
                 if ($statsLastWeek->getCtr() < $statsTwoWeeksAgo->getCtr() && $statsTwoWeeksAgo->getCtr() < $statsThreeWeeksAgo->getCtr()) {
                     reportRows . push([adGroup . getCampaign() . getName(), adGroup . getName(), statsLastWeek . getCtr() * 100, statsLastWeek . getCost(), statsTwoWeeksAgo . getCtr() * 100, statsTwoWeeksAgo . getCost(), statsThreeWeeksAgo . getCtr() * 100, statsThreeWeeksAgo . getCost()]);
                 }
             }
         }
         $selector->paging->startIndex += $selector->paging->numberResults;
     } while (!is_null($page->entries));
 }
开发者ID:bashilbers,项目名称:AdWordsApiScripts,代码行数:28,代码来源:DecliningAdGroups.php


示例4: renderForm

 /**
  * Create the render form.
  *
  * @access private
  * @return void
  * 
  * @author (c) Etienne de Longeaux <[email protected]>
  */
 private function renderForm()
 {
     if ($this->getTypeForm() == "zend") {
         self::$_content['_form_'] = $this->_form->render();
     } elseif ($this->getTypeForm() == "symfony") {
         $response = $this->container->get('templating')->renderResponse($this->container->getParameter('sfynx.auth.theme.layout.admin.form.builder') . ":{$this->_form_template}", array('form' => $this->_form->createView(), 'id_form' => $this->_form->getName(), 'id_block' => $this->_id_block, 'id_widget' => $this->_id_widget, 'form_name' => $this->_form_name));
         self::$_content['_form_'] = $response->getContent();
     }
 }
开发者ID:pigroupe,项目名称:SfynxCmfBundle,代码行数:17,代码来源:PiFormBuilderManager.php


示例5: pages_createMap

/**
 * Интеграция в карту сайта.
 *
 * @param object &$treemap Объект дерева карты сайта.
 * @param string $section Полный строковой идентификатор раздела.
 * @param string $caption Название раздела.
 */
function pages_createMap(&$treemap, $section, $caption = "")
{
    if (A::$OPTIONS['mainsection'] == getName($section)) {
        pages_createSubMap($treemap, $section, $caption, 0, true);
    } else {
        $treemap->items[$section] = new SiteMap_Box($caption, getSectionLink($section));
        pages_createSubMap($treemap->items[$section], $section, $caption);
    }
}
开发者ID:procivam,项目名称:s-mir-new,代码行数:16,代码来源:include.php


示例6: createRows

function createRows()
{
    $dbh = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);
    $user_insert = <<<EOF
insert into users 
    (id, active, approved, username, display_name, email) 
    values
    (:id, 1, 1, :username, :full_name, :email)
EOF;
    $user_stmt = $dbh->prepare($user_insert);
    $user_stmt->bindParam(':id', $user_id);
    $user_stmt->bindParam(':username', $username);
    $user_stmt->bindParam(':full_name', $full_name);
    $user_stmt->bindParam(':email', $email);
    $group_insert = <<<EOF
insert into users_groups 
    (id, active, name, user_id) 
    values
    (:id, 1, :username, :user_id)
EOF;
    $group_stmt = $dbh->prepare($group_insert);
    $group_stmt->bindParam(':id', $group_id);
    $group_stmt->bindParam(':username', $username);
    $group_stmt->bindParam(':user_id', $user_id);
    $student_insert = <<<EOF
insert into tg_student
    (user_id, first_name, last_name)
    values
    (:user_id, :first_name, :last_name)        
EOF;
    $student_stmt = $dbh->prepare($student_insert);
    $student_stmt->bindParam(':user_id', $user_id);
    $student_stmt->bindParam(':first_name', $first_name);
    $student_stmt->bindParam(':last_name', $last_name);
    $user_id_result = $dbh->query('select id from users_seq', PDO::FETCH_ASSOC);
    $lastUserId = $user_id_result->fetchColumn();
    $group_id_result = $dbh->query('select id from users_groups_seq', PDO::FETCH_ASSOC);
    $lastGroupId = $group_id_result->fetchColumn();
    for ($i = 1; $i <= STUDENT_LIMIT; $i++) {
        $user_id = $lastUserId + $i;
        $group_id = $lastGroupId + $i;
        $first_name = getName(1);
        $last_name = getName(2);
        $full_name = "{$first_name} {$last_name}";
        $username = makeUsername($first_name, $last_name);
        $email = $username . '@appstate.edu';
        $user_stmt->execute();
        $group_stmt->execute();
        $student_stmt->execute();
        echo "Created user {$username}\n";
    }
    $user_seq_stmt = 'update users_seq set id=' . $user_id;
    $dbh->exec($user_seq_stmt);
    $group_seq_stmt = 'update users_groups_seq set id=' . $group_id;
    $dbh->exec($group_seq_stmt);
}
开发者ID:AppStateESS,项目名称:tailgate,代码行数:56,代码来源:create-students.php


示例7: createData

 /**
  * Формирование данных доступных в шаблоне.
  */
 function createData()
 {
     static $banners = array();
     static $purl = null;
     if (is_null($purl)) {
         $purl = parse_url(urldecode(getenv('REQUEST_URI')));
     }
     $time = time();
     $this->params['idcat'] = (int) $this->params['idcat'];
     $unp = $this->structure . '|' . $this->params['idcat'] . '|' . $this->params['random'];
     if (!isset($banners[$unp])) {
         $banners[$unp] = A::$DB->_getAll("\r\r\n\tSELECT * FROM {$this->structure}\r\r\n\tWHERE idcat={$this->params['idcat']} AND active='Y' AND (date='N' OR (date='Y' AND date1<{$time} AND date2>{$time}))\r\r\n\tORDER BY " . (!empty($this->params['random']) ? "RAND()" : "sort"));
     }
     foreach ($banners[$unp] as $i => $row) {
         $show = empty($row['show']) && empty($row['showurl']);
         if (!$show && !empty($row['show'])) {
             $row['show'] = unserialize($row['show']);
             if (in_array(SECTION_ID, $row['show'])) {
                 $show = true;
             }
         }
         if (!$show && !empty($row['showurl'])) {
             $row['showurl'] = explode("\n", $row['showurl']);
             foreach ($row['showurl'] as $url) {
                 if (!$show) {
                     $puri = parse_url(trim($url));
                     if (empty($puri['path']) || mb_strpos($purl['path'], $puri['path']) === 0) {
                         $show = true;
                     }
                     if ($show && !empty($puri['query'])) {
                         parse_str($puri['query'], $query);
                         if ($query) {
                             foreach ($query as $name => $value) {
                                 if (!isset($_GET[$name]) || is_array($value) && !in_array($_GET[$name], $value) || !is_array($value) && $_GET[$name] != $value) {
                                     $show = false;
                                 }
                             }
                         }
                     }
                 }
             }
         }
         if ($show) {
             $banner = $row;
             unset($banners[$unp][$i]);
             break;
         }
     }
     if (!empty($banner)) {
         $banner['link'] = "/getfile/" . getName($this->structure) . "/click/?id=" . $banner['id'];
         $this->Assign("banner", $banner);
         A::$DB->_execute("UPDATE {$this->structure} SET views=views+1 WHERE id=" . $banner['id']);
     } else {
         $this->template = "";
     }
 }
开发者ID:procivam,项目名称:s-mir-new,代码行数:59,代码来源:banner.php


示例8: load_content

 function load_content($id)
 {
     $data['id'] = $id;
     $sess_id = sessId();
     $data['sess_name'] = getName(sessId());
     $data['buddy_name'] = getName($id);
     $q = "SELECT *\n            FROM chat\n            WHERE (sender_id = '{$sess_id}' AND receiver_id = '{$id}')\n            OR (sender_id = '{$id}' AND receiver_id = '{$sess_id}')\n            order by sent_on desc\n            limit 10\n            ";
     $data['message'] = $this->db->query($q);
     //lastq();
     $data['photo'] = '';
     $data['photo_chat'] = '';
     $this->db->where('sender_id', $id)->update('chat', array('is_read' => 1));
     $this->load->view('chat/content', $data);
 }
开发者ID:abdulghanni,项目名称:gsm,代码行数:14,代码来源:chat.php


示例9: validateSession

/**
 * validateSession()
 *
 * Returns true if a session has already been created in an
 * attempt to prevent abuse of the listener.
 */
function validateSession()
{
    global $A;
    // Activity object
    global $name;
    $name = getName();
    if (cookieVar(LACE_SESSION_COOKIE) === false && !$A->keyExists($name)) {
        joinMessage($name);
    }
    $A->update($name);
    setcookie(LACE_SESSION_COOKIE, getCookieString(), time() + 600, LACE_URL_REL);
    setcookie(LACE_NAME_COOKIE, $name, time() + 2592000, LACE_URL_REL);
    return true;
}
开发者ID:jtaverne,项目名称:lace,代码行数:20,代码来源:lib_utils.php


示例10: getName

function getName($min, $max, $row)
{
    $n = rand($min, $max);
    $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $randomString = '';
    for ($i = 0; $i < $n; $i++) {
        $randomString .= $characters[rand(0, strlen($characters) - 1)];
    }
    if (Mysql::alreadyExists($row, $randomString)) {
        getName($n, $row);
    } else {
        return $randomString;
    }
}
开发者ID:alijaffar,项目名称:UploadMe,代码行数:14,代码来源:upload_file.php


示例11: createVCard

function createVCard($array)
{
    $return = 'BEGIN:VCARD' . PHP_EOL;
    $return .= 'VERSION:2.1' . PHP_EOL;
    $return .= getName($array) . PHP_EOL;
    $return .= getFormatedName($array) . PHP_EOL;
    $return .= getPhoto($array);
    $return .= getTelephonePrivate($array);
    $return .= getMobilePrivate($array);
    //$return .= 'TEL;WORK;VOICE:(0221) 9999123' . PHP_EOL;
    //$return .= 'TEL;HOME;VOICE:(0221) 1234567' . PHP_EOL;
    $return .= getAddress($array);
    $return .= getEmail($array);
    $return .= date('Y-m-d H:i:s') . PHP_EOL;
    $return .= 'END:VCARD' . PHP_EOL;
    return $return;
}
开发者ID:michaelsoftware1997,项目名称:vision-server,代码行数:17,代码来源:vcard.php


示例12: send_notification

 function send_notification($id)
 {
     permissionUser();
     $url = base_url() . $this->file_name . '/detail/' . $id;
     $subject = 'Pengajuan Work Order';
     $isi = getName(sessId()) . " membuat Work Order, Untuk melihat detail silakan <a href={$url}> KLIK DISINI </a>.";
     $no = getValue('no', $this->table_name, array('id' => 'where/' . $id));
     //SEND NOTIFICATION TO PRODUCTION
     $group_id = array('8');
     $user_id = $this->db->select('user_id')->where_in('group_id', $group_id)->get('users_groups')->result();
     foreach ($user_id as $u) {
         $data = array('sender_id' => sessId(), 'receiver_id' => $u->user_id, 'sent_on' => dateNow(), 'judul' => $subject, 'isi' => $isi, 'no' => $no, 'url' => $url);
         $this->db->insert('notifikasi', $data);
         $this->send_email(getEmail($u->user_id), $subject, $isi);
     }
     return TRUE;
 }
开发者ID:abdulghanni,项目名称:gsm,代码行数:17,代码来源:wo.php


示例13: execute

 /**
  * @param string $command_string
  */
 public function execute()
 {
     if (!$command . validate()) {
         printError(array($cli_exec, $command . getName()), 'Incorrect command syntax');
         print $command . shortUsage();
         exit(1);
     }
     try {
         $command . execute();
     } catch (Zend_Console_CommandExecutionException $e) {
         printError(array($cli_exec, $e . getErrPath(), $e . getErrMsg()));
         exit(1);
     }
     /**
      * As far as we know, everything is A-OK
      */
     exit(0);
 }
开发者ID:jon9872,项目名称:zend-framework,代码行数:21,代码来源:Console.php


示例14: logout

/**
 * Logs the user out
 */
function logout($ID, $notime = false)
{
    global $con;
    $active = getActive($ID);
    //boolean - if the user is active
    $name = getName($ID);
    // get the user's name
    if (!$active) {
        $_SESSION['loginerror'] = "alreadysignedout";
        redirect();
    } else {
        $result = mysqli_query($con, "UPDATE students SET ACTIVE = 0 WHERE ID = '{$ID}'");
        if (!$result) {
            fancydie('Could not set active to false, ' . mysqli_error($con));
        }
        $result = mysqli_query($con, "UPDATE logs SET DATEOUT = now() WHERE DATEOUT = '0000-00-00 00:00:00' AND ID = '{$ID}'");
        if (!$result) {
            fancydie('Could not update logs, ' . mysqli_error($con));
        }
        if (!$notime) {
            $result = mysqli_query($con, "SELECT DATEIN,DATEOUT FROM logs WHERE ID = '{$ID}' ORDER BY NUM desc");
            if (!$result) {
                fancydie('Could not fetch log data, ' . mysqli_error($con));
            }
            $row = mysqli_fetch_array($result);
            $datein = $row['DATEIN'];
            $dateout = $row['DATEOUT'];
            $sessiontime = strtotime($dateout) - strtotime($datein);
            //get current time spent on team
            $result = mysqli_query($con, "SELECT TOTALTIME FROM students WHERE ID = '{$ID}'");
            if (!$result) {
                fancydie('Could not get total time, ' . mysqli_error($con));
            }
            $row = mysqli_fetch_array($result);
            $totaltime = $row['TOTALTIME'] + $sessiontime;
            //new total time
            $result = mysqli_query($con, "UPDATE students SET TOTALTIME = '{$totaltime}' WHERE ID = '{$ID}'");
            if (!$result) {
                fancydie('Could not set total time, ' . mysqli_error($con));
            }
        }
    }
}
开发者ID:chriscush765,项目名称:FRCsignin,代码行数:46,代码来源:dbmanager.php


示例15: filter

function filter($host, $path, $whitelistName)
{
    $whitelist_prefix = "/disk2/qatest/svn_code/qa/WebFramework/htdocs/m_smallTools/m_exceptionFilter/data/";
    // echo $whitelist_prefix;
    $fileName = getName();
    // echo $fileName."<hr/>";
    //将文件sed处理后放到该磁盘的test/exceptionFilter目录下
    $sedToPath = getSedToPath($path);
    $mkdirCmd = "ssh " . $host . " \"mkdir -p " . $sedToPath . "\"";
    // echo $mkdirCmd."<hr>";
    system($mkdirCmd);
    //对文件进行一遍sed过滤,将所有Exception和Error所在的行的行号以及内容存储到tmpE.log中
    $filterCmd = "ssh " . $host . " \" sed -n -e '/Exception/I {=;p;b}' -e '/Error/I {=;p}' " . $path . " > " . $sedToPath . $fileName . " \"";
    // echo $filterCmd."<hr/>";
    system($filterCmd);
    //将数据拷贝到本地data目录下
    $copyCmd = "scp " . $host . ":" . $sedToPath . $fileName . " " . $whitelist_prefix;
    // echo $copyCmd."<hr>";
    system($copyCmd);
    //删掉原机器上的tmp文件
    $deleteCmd = "ssh " . $host . " \" rm " . $sedToPath . $fileName . " \"";
    // echo $deleteCmd."<hr>";
    system($deleteCmd);
    $inFile = $whitelist_prefix . $fileName;
    // $whitelist = $whitelist_prefix .$whitelistName;
    // echo 'white list :'.$whitelist;
    if ($whitelistName != "") {
        //   echo 'new a ExceptionFilter<hr/>';
        $exceptionFilter = new ExceptionFilter($whitelistName);
        // echo 'start to get filter result...<hr/>';
        $result = $exceptionFilter->getFilterResult($inFile);
        $deleteDataCmd = "rm ../data/" . $fileName;
        system($deleteDataCmd);
        //echo $result;
        return $result;
    } else {
        echo 'whitelist:' . $whitelistName . ' is not exist.';
        $deleteDataCmd = "rm ../data/" . $fileName;
        system($deleteDataCmd);
    }
}
开发者ID:sleepyycat,项目名称:WebFramework,代码行数:41,代码来源:filter_process.php


示例16: addTripToDb

function addTripToDb($source, $destination, $date, $start_time, $end_time, $phone, $travellers, $comment, $private)
{
    if (!isLoggedIn()) {
        $response = array("status" => 1, "error" => "Invalid session");
        echo json_encode($response);
        return;
    }
    include "config.php";
    $query = "INSERT INTO new_cab_share (userid, source_addr, dest_addr, date, start_time, end_time, phone, travellers, comment, private, state, username) VALUES ('" . getUid() . "', '" . $source . "', '" . $destination . "', '" . $date . "', '" . $start_time . "', '" . $end_time . "', '" . $phone . "', '" . $travellers . "', '" . $comment . "',  '" . $private . "', 0, '" . getName() . "')";
    $success = mysqli_query($link, $query);
    if ($success) {
        $tripId = mysqli_insert_id($link);
        $data = array("message" => "Added new trip", "tripId" => $tripId);
        $response = array("status" => 0, "data" => $data);
        matchTrip($tripId);
        echo json_encode($response);
    } else {
        $response = array("status" => 1, "error" => "Unable to insert into DB");
        echo json_encode($response);
    }
}
开发者ID:mrinaldhar,项目名称:CabShare,代码行数:21,代码来源:addTrip.php


示例17: createAirTrainBooking

 function createAirTrainBooking($bean, $chuyenbay = '')
 {
     global $db;
     $sql = "\r\n            SELECT \r\n              a.id \r\n            FROM\r\n              `airlinestickets` a \r\n              JOIN `airlines_ailinestickets_c` b \r\n                ON a.`id` = b.`airlines_a1d09tickets_idb` \r\n                AND b.`deleted` = 0 \r\n                AND b.`airlines_a476cirlines_ida` = '{$chuyenbay->vemaybay}' \r\n              JOIN `groupprogralinestickets_c` c \r\n                ON a.`id` = c.`groupprogr8400tickets_idb` \r\n                AND c.`deleted` = 0 \r\n                AND c.`groupprogr0fd9rograms_ida` = '{$bean->id}' \r\n            WHERE a.`deleted` = 0 \r\n            ";
     $airTrainBooking = new AirlinesTickets();
     $result = $db->query($sql);
     while ($row = $db->fetchByAssoc($result)) {
         $airTrainBooking->id = $row['id'];
     }
     $airTrainBooking->groupprograestickets_name = $bean->name;
     $airTrainBooking->groupprogr0fd9rograms_ida = $bean->id;
     $airTrainBooking->airlines_a476cirlines_ida = $chuyenbay->vemaybay;
     $airline = new Airline();
     $getname_input = array('name' => 'id', 'value' => $chuyenbay->vemaybay);
     $airTrainBooking->airlines_aiestickets_name = getName($airline->table_name, $getname_input);
     $airTrainBooking->name = $airTrainBooking->groupprograestickets_name . ' - ' . $airTrainBooking->airlines_aiestickets_name;
     $airTrainBooking->assigned_user_name = $bean->assigned_user_name;
     $airTrainBooking->assigned_user_id = $bean->assigned_user_id;
     $return = $airTrainBooking->save();
     return $return;
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:21,代码来源:AutoGenerateBooking.php


示例18: createData

 function createData()
 {
     $rss = array();
     A::$DB->query("\r\r\n\tSELECT r.*,s.caption AS section\r\r\n\tFROM " . STRUCTURE . " AS r\r\r\n\tLEFT JOIN " . DOMAIN . "_sections AS s ON s.id=r.idsec\r\r\n\tORDER BY r.id");
     while ($row = A::$DB->fetchRow()) {
         if ($section = getSectionById($row['idsec'])) {
             $lang = getLang($section);
             $lang = $lang != DEFAULTLANG ? $lang . "/" : "";
             $sname = getName($section);
         } else {
             $lang = $sname = "";
         }
         $row['link'] = "http://" . DOMAINNAME . "/{$lang}getfile/" . getName(STRUCTURE) . ($sname ? "/{$sname}.rss" : "/");
         if ($row['idcat'] > 0) {
             $row['link'] .= "?idcat=" . $row['idcat'];
         }
         $rss[] = $row;
     }
     A::$DB->free();
     $this->Assign("rss", $rss);
 }
开发者ID:procivam,项目名称:s-mir-new,代码行数:21,代码来源:rss.php


示例19: rss_showpage

function rss_showpage($template)
{
    if (A_MODE == A_MODE_FRONT) {
        $rss = array();
        $structures = getStructuresByPlugin('rss');
        foreach ($structures as $structure) {
            A::$DB->query("SELECT * FROM {$structure}");
            while ($row = A::$DB->fetchRow()) {
                $section = getSectionById($row['idsec']);
                $lang = getLang($section);
                $lang = $lang != DEFAULTLANG ? $lang . "/" : "";
                $link = "http://" . DOMAINNAME . "/{$lang}getfile/" . getName($structure) . "/" . getName($section) . ".rss";
                if ($row['idcat'] > 0) {
                    $link .= "?idcat=" . $row['idcat'];
                }
                $rss[] = $link;
            }
            A::$DB->free();
        }
        A::$MAINFRAME->Assign("rss", $rss);
    }
}
开发者ID:procivam,项目名称:s-mir-new,代码行数:22,代码来源:include.php


示例20: glob_files

 /**
  * FUNCTION USED TO GET FILES FROM DIRECTORY
  */
 function glob_files($source_folder, $ext = '*', $sec = 0)
 {
     if (!is_dir($source_folder)) {
         die("Invalid directory.\n\n");
     }
     $FILES = glob($source_folder . $this->dirsep . "*." . $ext);
     $set_limit = 0;
     foreach ($FILES as $key => $file) {
         if (filemtime($file) > $sec) {
             $FILE_LIST[$key]['path'] = substr($file, 0, strrpos($file, $this->dirsep) + 1);
             $FILE_LIST[$key]['file'] = substr($file, strrpos($file, $this->dirsep) + 1);
             $FILE_LIST[$key]['title'] = getName($FILE_LIST[$key]['file']);
             $FILE_LIST[$key]['description'] = getName($FILE_LIST[$key]['file']);
             $FILE_LIST[$key]['tags'] = gentags(str_replace(" ", ",", getName($FILE_LIST[$key]['file'])));
             $FILE_LIST[$key]['size'] = filesize($file);
             $FILE_LIST[$key]['date'] = date('Y-m-d G:i:s', filemtime($file));
         }
     }
     if (!empty($FILE_LIST)) {
         return $FILE_LIST;
     } else {
         return false;
     }
 }
开发者ID:yukisky,项目名称:clipbucket,代码行数:27,代码来源:mass_upload.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getNameFormat函数代码示例发布时间:2022-05-15
下一篇:
PHP getNS函数代码示例发布时间: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