当前位置: 首页>>代码示例>>PHP>>正文


PHP get_ini函数代码示例

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


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

示例1: cpu

    function cpu($id)
    {
        $this->id = $id;
        // Get the disk informations
        $q0 = get_link()->prepare('SELECT 
									c.id AS ID,
									c.logical_id AS LOGICALID,
									c.max_clock_speed AS MAXCLOCKSPEED,
									c.name AS NAME,
									c.created_date AS CREATED_DATE,
									c.created_id AS CREATED_ID,
									c.edited_date AS EDITED_DATE,
									c.edited_id AS EDITED_ID,
									c.deleted_date AS DELETED_DATE,
									c.deleted_id AS DELETED_ID
								FROM ' . get_ini('BDD_PREFIX') . 'cmdb_dev_os_cpu c 
								WHERE id=:id AND deleted_date=0');
        $q0->execute(array('id' => $id));
        $r0 = $q0->fetch(PDO::FETCH_OBJ);
        if (isset($r0->ID)) {
            $this->logicalId = $r0->LOGICALID;
            $this->maxClockSpeed = $r0->MAXCLOCKSPEED;
            $this->name = $r0->NAME;
            $this->createdDate = $r0->CREATED_DATE;
            $this->createdID = $r0->CREATED_ID;
            $this->editedDate = $r0->EDITED_DATE;
            $this->editedId = $r0->EDITED_ID;
            $this->deletedDate = $r0->DELETED_DATE;
            $this->deltedId = $r0->DELETED_ID;
        } else {
            // TODO add log management
            echo 'The cpu does not exist.';
            exit(100);
        }
    }
开发者ID:Julien-SIMON,项目名称:GobelinsLab,代码行数:35,代码来源:_cpu.class.php

示例2: environment

    function environment($id)
    {
        $this->id = $id;
        // Get the disk informations
        $q0 = get_link()->prepare('SELECT 
									e.id AS ID,
									e.id_parent AS ID_PARENT,
									e.name AS NAME,
									e.created_date AS CREATED_DATE,
									e.created_id AS CREATED_ID,
									e.edited_date AS EDITED_DATE,
									e.edited_id AS EDITED_ID,
									e.deleted_date AS DELETED_DATE,
									e.deleted_id AS DELETED_ID
								FROM ' . get_ini('BDD_PREFIX') . 'cmdb_environments e 
								WHERE id=:id AND deleted_date=0');
        $q0->execute(array('id' => $id));
        $r0 = $q0->fetch(PDO::FETCH_OBJ);
        if (isset($r0->ID)) {
            $this->parentId = $r0->ID_PARENT;
            $this->name = $r0->NAME;
            $this->createdDate = $r0->CREATED_DATE;
            $this->createdID = $r0->CREATED_ID;
            $this->editedDate = $r0->EDITED_DATE;
            $this->editedId = $r0->EDITED_ID;
            $this->deletedDate = $r0->DELETED_DATE;
            $this->deltedId = $r0->DELETED_ID;
        } else {
            // TODO add log management
            echo 'The environment don\'t exist.';
            exit(100);
        }
    }
开发者ID:Julien-SIMON,项目名称:GobelinsLab,代码行数:33,代码来源:_environment.class.php

示例3: perform

 function perform(&$request, &$response)
 {
     $object_data =& fetch_requested_object($request);
     $ini =& get_ini('image_variations.ini');
     $image_variations = $ini->get_all();
     foreach ($image_variations as $key => $value) {
         if (array_key_exists($key, $_GET)) {
             $variation = $key;
             break;
         }
     }
     if (empty($variation)) {
         $variation = 'thumbnail';
     }
     $image = $object_data['variations'][$variation];
     if (!$image) {
         $response->header("Content-type: image/gif");
         $response->readfile(SHARED_DIR . 'images/1x1.gif');
         if ($variation == 'original') {
             $request->set_status(REQUEST_STATUS_FAILURE);
             return;
         } else {
             $response->commit();
             //for speed
         }
     }
     if (!file_exists(MEDIA_DIR . $image['media_id'] . '.media')) {
         $response->header("HTTP/1.1 404 Not found");
         if ($variation == 'original') {
             $request->set_status(REQUEST_STATUS_FAILURE);
             return;
         } else {
             $response->commit();
             //for speed
         }
     }
     if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $image['etag']) {
         $response->use_client_cache();
         $response->header("Pragma: public");
         $response->header("Cache-Control: private");
         $response->header("Date: " . date("D, d M Y H:i:s") . " GMT");
         $response->header("Etag: {$image['etag']}");
     } else {
         $response->header("Pragma: public");
         $response->header("Cache-Control: private");
         $response->header("Date: " . date("D, d M Y H:i:s") . " GMT");
         $response->header("Etag: {$image['etag']}");
         $response->header("Content-type: {$image['mime_type']}");
         $response->header("Content-Disposition: filename={$image['file_name']}");
         $response->readfile(MEDIA_DIR . $image['media_id'] . '.media');
     }
     if ($variation == 'original') {
         return;
     } else {
         $response->commit();
         //for speed
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:58,代码来源:display_image_action.class.php

示例4: _init_dataspace

 function _init_dataspace(&$request)
 {
     parent::_init_dataspace($request);
     $ini =& get_ini('image_variations.ini');
     $image_variations = $ini->get_all();
     foreach ($image_variations as $variation => $variation_data) {
         $this->dataspace->set('upload_' . $variation . '_max_size', isset($variation_data['max_size']) ? $variation_data['max_size'] : '');
         $this->dataspace->set('generate_' . $variation . '_max_size', isset($variation_data['max_size']) ? $variation_data['max_size'] : '');
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:create_image_action.class.php

示例5: _init_dataspace

 function _init_dataspace()
 {
     parent::_init_dataspace();
     $ini =& get_ini('image_variations.ini');
     $image_variations = $ini->get_named_array();
     foreach ($image_variations as $variation => $variation_data) {
         $this->_set('upload_' . $variation . '_max_size', isset($variation_data['max_size']) ? $variation_data['max_size'] : '');
         $this->_set('generate_' . $variation . '_max_size', isset($variation_data['max_size']) ? $variation_data['max_size'] : '');
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:create_image_action.class.php

示例6: _load_jobs

 function _load_jobs()
 {
     $ini =& get_ini('cron.ini');
     $this->jobs = array();
     $groups = $ini->get_all();
     foreach ($groups as $group => $data) {
         if (strpos($group, 'cron-job') === 0) {
             $this->jobs[$group] = $data;
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:11,代码来源:cron_manager.class.php

示例7: run

 function run(&$filter_chain, &$request, &$response)
 {
     debug::add_timing_point('jip filter started');
     $fetcher =& fetcher::instance();
     $fetcher->set_jip_status(false);
     $user =& user::instance();
     if ($user->is_logged_in()) {
         $ini =& get_ini('jip_groups.ini');
         if ($user->is_in_groups(array_keys($ini->get_group('groups')))) {
             $fetcher->set_jip_status(true);
         }
     }
     debug::add_timing_point('jip filter done');
     $filter_chain->next();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:15,代码来源:jip_filter.class.php

示例8: _get_variation

 function _get_variation(&$request)
 {
     $ini =& get_ini('image_variations.ini');
     $image_variations = $ini->get_all();
     foreach ($image_variations as $key => $value) {
         if ($request->has_attribute($key)) {
             $variation = $key;
             break;
         }
     }
     if (empty($variation)) {
         $variation = 'thumbnail';
     }
     return $variation;
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:15,代码来源:display_image_action.class.php

示例9: _get_variation

 function _get_variation()
 {
     $ini =& get_ini('image_variations.ini');
     $image_variations = $ini->get_all();
     foreach ($image_variations as $key => $value) {
         if (array_key_exists($key, $_GET)) {
             $variation = $key;
             break;
         }
     }
     if (empty($variation)) {
         $variation = 'thumbnail';
     }
     return $variation;
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:15,代码来源:display_image_action.class.php

示例10: disk

    function disk($id)
    {
        $this->id = $id;
        // Get the disk informations
        $q0 = get_link()->prepare('SELECT 
									d.id AS ID,
									d.name AS NAME,
									d.interfacetype AS INTERFACETYPE,
									d.disk_size AS TOTALSIZE,
									d.caption AS CAPTION,
									d.firmwarerevision AS FIRMWAREREVISION,
									d.manufacturer AS MANUFACTURER,
									d.model AS MODEL,
									d.serialnumber AS SERIALNUMBER,
									d.created_date AS CREATED_DATE,
									d.created_id AS CREATED_ID,
									d.edited_date AS EDITED_DATE,
									d.edited_id AS EDITED_ID,
									d.deleted_date AS DELETED_DATE,
									d.deleted_id AS DELETED_ID
								FROM ' . get_ini('BDD_PREFIX') . 'cmdb_dev_os_disks d 
								WHERE id=:id AND deleted_date=0');
        $q0->execute(array('id' => $id));
        $r0 = $q0->fetch(PDO::FETCH_OBJ);
        if (isset($r0->ID)) {
            $this->name = $r0->NAME;
            $this->interfaceType = $r0->INTERFACETYPE;
            $this->totalSize = $r0->TOTALSIZE;
            $this->caption = $r0->CAPTION;
            $this->firmwareRevision = $r0->FIRMWAREREVISION;
            $this->manufacturer = $r0->MANUFACTURER;
            $this->model = $r0->MODEL;
            $this->serialNumber = $r0->SERIALNUMBER;
            $this->createdDate = $r0->CREATED_DATE;
            $this->createdID = $r0->CREATED_ID;
            $this->editedDate = $r0->EDITED_DATE;
            $this->editedId = $r0->EDITED_ID;
            $this->deletedDate = $r0->DELETED_DATE;
            $this->deltedId = $r0->DELETED_ID;
        } else {
            // TODO add log management
            echo 'The disk does not exist.';
            exit(100);
        }
    }
开发者ID:Julien-SIMON,项目名称:GobelinsLab,代码行数:45,代码来源:_disk.class.php

示例11: objects

 function objects($id)
 {
     $this->id = $id;
     // Get the disk informations
     $q0 = get_link()->prepare("SELECT \n\t\t\t\t\t\t\t\t\tobj.id AS ID,\n\t\t\t\t\t\t\t\t\tobj.created_date AS CREATED_DATE,\n\t\t\t\t\t\t\t\t\tobj.created_id AS CREATED_ID,\n\t\t\t\t\t\t\t\t\tobj.edited_date AS EDITED_DATE,\n\t\t\t\t\t\t\t\t\tobj.edited_id AS EDITED_ID,\n\t\t\t\t\t\t\t\t\tobj.deleted_date AS DELETED_DATE,\n\t\t\t\t\t\t\t\t\tobj.deleted_id AS DELETED_ID\n\t\t\t\t\t\t\t\tFROM " . get_ini('BDD_PREFIX') . "core_objects obj \n\t\t\t\t\t\t\t\tWHERE obj.id=:id");
     $q0->execute(array('id' => $id));
     $r0 = $q0->fetch(PDO::FETCH_OBJ);
     if (isset($r0->ID)) {
         $this->createdDate = $r0->CREATED_DATE;
         $this->createdID = $r0->CREATED_ID;
         $this->editedDate = $r0->EDITED_DATE;
         $this->editedId = $r0->EDITED_ID;
         $this->deletedDate = $r0->DELETED_DATE;
         $this->deltedId = $r0->DELETED_ID;
     } else {
         // TODO add log management
         echo 'The disk don\'t exist.';
         exit(100);
     }
 }
开发者ID:Julien-SIMON,项目名称:GobelinsLab,代码行数:20,代码来源:_object.class.php

示例12: service

    function service($id)
    {
        $this->id = $id;
        // Get the disk informations
        $q0 = get_link()->prepare('SELECT 
									s.id AS ID,
									s.name AS NAME,
									s.path_name AS PATHNAME,
									s.start_mode AS STARTMODE,
									s.service_state AS SERVICESTATE,
									s.owner AS OWNER,
									s.created_date AS UP_CREATED_DATE,
									s.created_id AS UP_CREATED_ID,
									s.created_date AS CREATED_DATE,
									s.created_id AS CREATED_ID,
									s.edited_date AS EDITED_DATE,
									s.edited_id AS EDITED_ID,
									s.deleted_date AS DELETED_DATE,
									s.deleted_id AS DELETED_ID
								FROM ' . get_ini('BDD_PREFIX') . 'cmdb_dev_os_services s
								WHERE s.id=:id AND s.deleted_date=0');
        $q0->execute(array('id' => $id));
        $r0 = $q0->fetch(PDO::FETCH_OBJ);
        if (isset($r0->ID)) {
            $this->name = $r0->NAME;
            $this->pathName = $r0->PATHNAME;
            $this->startMode = $r0->STARTMODE;
            $this->serviceState = $r0->SERVICESTATE;
            $this->owner = $r0->OWNER;
            $this->createdDate = $r0->CREATED_DATE;
            $this->createdID = $r0->CREATED_ID;
            $this->editedDate = $r0->EDITED_DATE;
            $this->editedId = $r0->EDITED_ID;
            $this->deletedDate = $r0->DELETED_DATE;
            $this->deltedId = $r0->DELETED_ID;
        } else {
            // TODO add log management
            echo 'The service does not exist.';
            exit(100);
        }
    }
开发者ID:Julien-SIMON,项目名称:GobelinsLab,代码行数:41,代码来源:_service.class.php

示例13: eventLog

 function eventLog($id)
 {
     $this->id = $id;
     // Get the disk informations
     $q0 = get_link()->prepare("SELECT \n\t\t\t\t\t\t\t\t\tev.id AS ID,\n\t\t\t\t\t\t\t\t\tev.log_statement AS LOGSTATEMENT,\n\t\t\t\t\t\t\t\t\tpg.name AS PLUGIN,\n\t\t\t\t\t\t\t\t\tev.created_date AS CREATED_DATE,\n\t\t\t\t\t\t\t\t\tev.created_id AS CREATED_ID,\n\t\t\t\t\t\t\t\t\tev.edited_date AS EDITED_DATE,\n\t\t\t\t\t\t\t\t\tev.edited_id AS EDITED_ID,\n\t\t\t\t\t\t\t\t\tev.deleted_date AS DELETED_DATE,\n\t\t\t\t\t\t\t\t\tev.deleted_id AS DELETED_ID\n\t\t\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t\t" . get_ini('BDD_PREFIX') . "core_event_logs ev,\n\t\t\t\t\t\t\t\t" . get_ini('BDD_PREFIX') . "core_plugins pg\n\t\t\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t\tev.id_plugin=pg.id AND\n\t\t\t\t\t\t\t\tev.id=:id");
     $q0->execute(array('id' => $id));
     $r0 = $q0->fetch(PDO::FETCH_OBJ);
     if (isset($r0->ID)) {
         $this->logStatement = $r0->LOGSTATEMENT;
         $this->plugin = $r0->PLUGIN;
         $this->createdDate = $r0->CREATED_DATE;
         $this->createdID = $r0->CREATED_ID;
         $this->editedDate = $r0->EDITED_DATE;
         $this->editedId = $r0->EDITED_ID;
         $this->deletedDate = $r0->DELETED_DATE;
         $this->deltedId = $r0->DELETED_ID;
     } else {
         // TODO add log management
         exit(100);
     }
 }
开发者ID:Julien-SIMON,项目名称:GobelinsLab,代码行数:21,代码来源:_event_log.class.php

示例14: access

 function access($id)
 {
     $this->id = $id;
     // Get the disk informations
     $q0 = get_link()->prepare("SELECT \n\t\t\t\t\t\t\t\t\tsec.id AS ID,\n\t\t\t\t\t\t\t\t\tsec.id_source AS IDSOURCE,\n\t\t\t\t\t\t\t\t\tsec.id_target AS IDTARGET,\n\t\t\t\t\t\t\t\t\tsec.secure_level AS SECURELEVEL,\n\t\t\t\t\t\t\t\t\tsec.created_date AS CREATED_DATE,\n\t\t\t\t\t\t\t\t\tsec.created_id AS CREATED_ID,\n\t\t\t\t\t\t\t\t\tsec.edited_date AS EDITED_DATE,\n\t\t\t\t\t\t\t\t\tsec.edited_id AS EDITED_ID,\n\t\t\t\t\t\t\t\t\tsec.deleted_date AS DELETED_DATE,\n\t\t\t\t\t\t\t\t\tsec.deleted_id AS DELETED_ID\n\t\t\t\t\t\t\t\tFROM " . get_ini('BDD_PREFIX') . "core_access sec \n\t\t\t\t\t\t\t\tWHERE sec.id=:id");
     $q0->execute(array('id' => $id));
     $r0 = $q0->fetch(PDO::FETCH_OBJ);
     if (isset($r0->ID)) {
         $this->secureLevel = $r0->SECURELEVEL;
         $this->createdDate = $r0->CREATED_DATE;
         $this->createdID = $r0->CREATED_ID;
         $this->editedDate = $r0->EDITED_DATE;
         $this->editedId = $r0->EDITED_ID;
         $this->deletedDate = $r0->DELETED_DATE;
         $this->deltedId = $r0->DELETED_ID;
     } else {
         // TODO add log management
         echo 'The access doesn\'t exist.';
         exit(100);
     }
 }
开发者ID:Julien-SIMON,项目名称:GobelinsLab,代码行数:21,代码来源:_access.class.php

示例15: table

 function table($id)
 {
     $this->id = $id;
     // Get the group informations
     $q0 = get_link()->prepare("SELECT \n\t\t\t\t\t\t\t\t\tt.id AS ID,\n\t\t\t\t\t\t\t\t\tt.name AS NAME,\n\t\t\t\t\t\t\t\t\tt.created_date AS CREATED_DATE,\n\t\t\t\t\t\t\t\t\tt.created_id AS CREATED_ID,\n\t\t\t\t\t\t\t\t\tt.edited_date AS EDITED_DATE,\n\t\t\t\t\t\t\t\t\tt.edited_id AS EDITED_ID,\n\t\t\t\t\t\t\t\t\tt.deleted_date AS DELETED_DATE,\n\t\t\t\t\t\t\t\t\tt.deleted_id AS DELETED_ID\n\t\t\t\t\t\t\t\tFROM " . get_ini('BDD_PREFIX') . "core_tables t \n\t\t\t\t\t\t\t\tWHERE t.id=:id");
     $q0->execute(array('id' => $id));
     $r0 = $q0->fetch(PDO::FETCH_OBJ);
     if (isset($r0->ID)) {
         $this->name = $r0->NAME;
         $this->createdDate = $r0->CREATED_DATE;
         $this->createdID = $r0->CREATED_ID;
         $this->editedDate = $r0->EDITED_DATE;
         $this->editedId = $r0->EDITED_ID;
         $this->deletedDate = $r0->DELETED_DATE;
         $this->deltedId = $r0->DELETED_ID;
     } else {
         // TODO add log management
         echo 'The table does not exist.';
         exit(100);
     }
 }
开发者ID:Julien-SIMON,项目名称:GobelinsLab,代码行数:21,代码来源:_table.class.php


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