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


PHP Path::getPath方法代码示例

本文整理汇总了PHP中Path::getPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Path::getPath方法的具体用法?PHP Path::getPath怎么用?PHP Path::getPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Path的用法示例。


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

示例1: createPath

 /**
  * @throws OptimiseException on problems during creation of tmp dir
  */
 public static function createPath()
 {
     $path = new Path(tempnam(sys_get_temp_dir(), 'OPT'));
     //TODO check the return in case of errors this return false on failure
     unlink($path->getPath());
     //remove file to create a dir
     if (file_exists($path->getPath())) {
         throw new OptimiseException('problem during creation of tmp dir (the directory already exists)');
     }
     if (!@mkdir($path->getPath())) {
         throw new OptimiseException('problem during creation of tmp dir (mkdir problem)');
     }
     if (!is_dir($path->getPath())) {
         throw new OptimiseException('problem during creation of tmp dir (it is not possible to create directory)');
     }
     return $path;
 }
开发者ID:dsd-meetme,项目名称:backend,代码行数:20,代码来源:Path.php

示例2: modulos

 function modulos()
 {
     parent::Controller();
     $this->load->library("rapyd");
     $this->load->library("path");
     $path = new Path();
     $path->setPath($this->config->item('uploads_dir'));
     $path->append('/graficos');
     $this->upload_path = $path->getPath() . '/';
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:10,代码来源:modulos.php

示例3: Catalogo

 function Catalogo()
 {
     parent::Controller();
     $this->load->library("rapyd");
     $this->load->library("path");
     $path = new Path();
     $path->setPath($this->config->item('uploads_dir'));
     $path->append('/inventario');
     $this->upload_path = $path->getPath();
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:10,代码来源:catalogo.php

示例4: sinvactu

 function sinvactu()
 {
     parent::Controller();
     $this->load->library("rapyd");
     $this->load->library("path");
     $path = new Path();
     $path->setPath($this->config->item('uploads_dir'));
     $path->append('/archivos');
     $this->upload_path = $path->getPath() . '/';
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:10,代码来源:sinvactu.php

示例5: logo

 function logo()
 {
     parent::Controller();
     $this->load->library("rapyd");
     $this->load->helper('download');
     $this->load->library("path");
     $path = new Path();
     $path->setPath($this->config->item('base_url'));
     $path->append('images');
     echo $this->upload_path = $path->getPath() . '/';
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:11,代码来源:logo.php

示例6: Publicidad

 function Publicidad()
 {
     parent::Controller();
     $this->load->library("rapyd");
     $this->load->library("path");
     $path = new Path();
     $path->setPath($this->config->item('uploads_dir'));
     $path->append('publicidad');
     $this->upload_path = $path->getPath() . '/';
     //$this->datasis->modulo_id(907,1);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:11,代码来源:publicidad.php

示例7: logo

 function logo()
 {
     parent::Controller();
     $this->load->library('rapyd');
     $this->load->helper('download');
     $this->load->library('path');
     $path = new Path();
     $path->setPath($this->config->item('base_url'));
     $path->append('images');
     $this->upload_path = $path->getPath() . '/';
     $this->write = is_writable('images');
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:12,代码来源:logo.php

示例8: cargasinv

 function cargasinv()
 {
     parent::Controller();
     $this->load->library("rapyd");
     $this->load->library("path");
     $this->load->library('encrypt');
     $this->load->helper('string');
     $path = new Path();
     $path->setPath($this->config->item('uploads_dir'));
     $path1 = reduce_double_slashes(FCPATH . '/uploads/archivos');
     $path->append('/archivos');
     $this->upload_path = $path->getPath() . '/';
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:13,代码来源:cargasinv.php

示例9: Publicidad

 function Publicidad()
 {
     parent::Controller();
     $this->id_modulo = '91A';
     $this->load->library('rapyd');
     $this->load->library('path');
     $path = new Path();
     $path->setPath($this->config->item('uploads_dir'));
     $path->append('publicidad');
     $this->upload_path = $path->getPath() . '/';
     $this->rel_path = reduce_double_slashes(str_replace($this->config->item('base_url'), '', $this->upload_path));
     $this->write = is_writable($this->rel_path);
     if (!is_writable($this->rel_path)) {
         show_error('No se puede escribir en el directorio ' . $this->rel_path . ', debe ajustar los permisos');
     }
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:16,代码来源:publicidad.php

示例10: load

 function load()
 {
     $this->load->library('path');
     $this->load->helper('html');
     $path = new Path();
     $path->setPath($this->config->item('uploads_dir'));
     $path->append('/archivos');
     $this->upload_path = $path->getPath() . '/';
     $this->rapyd->load('dataform');
     $form = new DataForm($this->url . 'load/process');
     $form->title('Importar Archivos');
     $form->explica1 = new containerField('', "<p style='color:blue;background-color:C6DAF6;align:center'>Para cargar un nuevo archivo de data seleccionelo en el el bot&oacute;n Examinar y luego presione enviar.</p>");
     $form->container = new containerField('adver', 'Solo archivos en formato EXCEL 97, asegurese de que la informacion que desea importar este en la hoja 1.');
     $form->archivo = new uploadField('Archivo', 'archivo');
     $form->archivo->upload_path = '';
     $form->archivo->allowed_types = 'xls';
     $form->archivo->delete_file = false;
     $form->archivo->upload_root = '/tmp';
     $form->archivo->rule = 'required';
     $form->archivo->append('Solo archivos en formato xls (Excel 97-2003)');
     $form->submit('btnsubmit', 'Enviar');
     $form->build_form();
     $rti = '';
     if ($form->on_success()) {
         $idtabla = intval($this->datasis->dameval('SELECT MAX(id_tabla) AS maxid FROM ' . $this->tabla));
         $idtabla++;
         $arch = '/tmp/' . $form->archivo->upload_data['file_name'];
         $rt = $this->_xlsread($arch, $idtabla);
         $rti = "<p>{$rt}</p>";
     }
     $lista = array();
     $mSQL = 'SELECT id_tabla,COUNT(*) AS cana  FROM ' . $this->tabla . ' GROUP BY id_tabla ORDER BY id_tabla DESC LIMIT 10';
     $query = $this->db->query($mSQL);
     if ($query->num_rows() > 0) {
         foreach ($query->result() as $row) {
             $lista[] = anchor($this->url . 'procesar/' . $row->id_tabla, 'Tabla: ' . $row->id_tabla . ' (' . $row->cana . ' registros).');
         }
         $listaul = '<h2>Tablas ya importadas</h2>' . ul($lista);
     } else {
         $listaul = '';
     }
     $data['content'] = $rti . $form->output . $listaul;
     $data['title'] = heading('Importaci&oacute;n de data desde archivos');
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:46,代码来源:extimpor.php

示例11: COUNT

 function _post_delete($do)
 {
     $nombre = $do->get('nombre');
     $chek = $this->datasis->dameval("SELECT COUNT(*) FROM sinvfot WHERE nombre='{$nombre}'");
     if ($chek <= 0) {
         $path = new Path();
         $path->setPath($_SERVER['DOCUMENT_ROOT']);
         $path->append($this->upload_path);
         $path->append($nombre);
         unlink($path->getPath());
     }
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:12,代码来源:fotos.php

示例12: cerberus

 function cerberus()
 {
     $this->load->helper('string');
     $this->load->library('path');
     $path = new Path();
     $path->setPath($this->config->item('uploads_dir'));
     $path->append('/fnomina');
     $upload_path = reduce_double_slashes('../' . $path->getPath() . '/');
     $query = $this->db->query('SELECT id,sid,ip,usr,pwd FROM cerberus WHERE activo="S"');
     foreach ($query->result() as $row) {
         $id = $row->sid;
         $ip = $row->ip;
         $usr = $row->usr;
         $pwd = $row->pwd;
         $link = mysql_connect($ip, $usr, $pwd) or die('Maquina fuera de linea');
         mysql_select_db('datasis') or die('Base de datos no seleccionable');
         $mSQL = "SELECT id,codigo, nacional, cedula,fecha,hora,foto FROM cer_cacc WHERE id>{$id} ORDER BY id";
         $result = mysql_query($mSQL, $link);
         $num_rows = mysql_num_rows($result);
         if ($num_rows > 0) {
             while ($data = mysql_fetch_assoc($result)) {
                 $fnombre = $data['codigo'] . '-' . preg_replace('/[^0-9]+/', '', $data['fecha'] . $data['hora']) . '.jpg';
                 //echo $fnombre.br();
                 file_put_contents($upload_path . $fnombre, $data['foto']);
                 $sid = $data['id'];
                 unset($data['foto']);
                 unset($data['id']);
                 $sql = $this->db->insert_string('cacc', $data);
                 $ban = $this->db->simple_query($sql);
                 if (!$ban) {
                     memowrite($sql, 'accesos');
                 }
             }
             $data = array('sid' => $sid);
             $sql = $this->db->update_string('cerberus', $data, 'id=' . $row->id);
             $ban = $this->db->simple_query($sql);
             if (!$ban) {
                 memowrite($sql, 'accesos');
             }
         }
     }
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:42,代码来源:accesos.php

示例13: load

 function load($numero)
 {
     $this->rapyd->load("dataform");
     $this->load->library("path");
     $path = new Path();
     $path->setPath($this->config->item('uploads_dir'));
     $path->append('/archivos');
     $this->upload_path = $path->getPath() . '/';
     $link = site_url('supervisor/subexls/deshacer');
     $form = new DataForm("supervisor/subexls/read/ITFAC2/{$numero}");
     $form->title('Cargar Archivo de Retenciones (xls)');
     $form->archivo = new uploadField("Archivo", "archivo");
     $form->archivo->upload_path = $this->upload_path;
     $form->archivo->allowed_types = "xls";
     $form->archivo->delete_file = false;
     $form->archivo->rule = "required";
     $form->submit("btnsubmit", "Cargar");
     $form->build_form();
     $salida = anchor($this->url . "dataedit/show/{$numero}", "Ir Atras");
     $data['content'] = $form->output . $salida;
     $data['title'] = "<h1>Cargar archivo de retenciones</h1>";
     $data["head"] = script("jquery.pack.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:24,代码来源:itfac2.php

示例14: imagenes

 function imagenes($contenedor)
 {
     $this->load->library('path');
     $path = new Path();
     $path->setPath($this->config->item('uploads_dir'));
     $path->append('/crm');
     $upload_path = $path->getPath() . '/';
     $this->rapyd->load('dataedit');
     $edit = new DataEdit('Imagenes', $this->prefijo . 'adjuntos');
     $edit->back_save = true;
     $edit->back_delete = true;
     $edit->back_cancel = true;
     $edit->back_cancel_save = true;
     $edit->back_cancel_delete = true;
     if (empty($this->crm_back)) {
         $edit->back_url = site_url('crm/contenedor/dataedit/show/' . $contenedor);
     } else {
         $edit->back_url = $this->crm_back;
     }
     $edit->usuario = new autoUpdateField('usuario', $this->session->userdata('usuario'), $this->session->userdata('usuario'));
     $edit->contenedor = new autoUpdateField('contenedor', $contenedor, $contenedor);
     $edit->fecha = new dateField('Fecha', 'fecha', 'd/m/Y');
     $edit->fecha->rule = 'required';
     $edit->fecha->size = 10;
     $edit->fecha->maxlength = 8;
     $edit->fecha->insertValue = date('Y-m-d');
     $edit->descripcion = new inputField('Descripci&oacute;n', 'descripcion');
     $edit->descripcion->rule = 'trim|required|max_length[200]';
     $edit->nombre = new uploadField('Archivo', 'nombre');
     $edit->nombre->upload_path = $upload_path;
     $edit->nombre->rule = 'required';
     $edit->nombre->allowed_types = 'jpg';
     //$edit->img->thumb = array (63,91);
     $edit->buttons('modify', 'save', 'undo', 'delete', 'back');
     $edit->build();
     $data['content'] = $edit->output;
     $data['title'] = '<h1>Imagenes</h1>';
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:40,代码来源:contenedor.php

示例15: testCanGetPath

 public function testCanGetPath()
 {
     $path = new Path($this->sampleFilePath);
     $this->assertEquals($this->sampleFilePath, $path->getPath());
 }
开发者ID:kamranahmedse,项目名称:smasher,代码行数:5,代码来源:PathTest.php


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