]> git.llucax.com Git - mecon/meconlib.git/commitdiff
Se agrega un archivo con funciones de uso general.
authorLeandro Lucarella <llucax@gmail.com>
Wed, 18 Jun 2003 18:14:43 +0000 (18:14 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Wed, 18 Jun 2003 18:14:43 +0000 (18:14 +0000)
La primera y unica funcion por ahora es prepend_include_path() que sirve para
agregar un path al include path.

lib/general.php [new file with mode: 0644]

diff --git a/lib/general.php b/lib/general.php
new file mode 100644 (file)
index 0000000..057f02b
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +----------------------------------------------------------------------+
+// | PHP Version 4                                                        |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group                                |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license,      |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available at through the world-wide-web at                           |
+// | http://www.php.net/license/2_02.txt.                                 |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license@php.net so we can mail you a copy immediately.               |
+// +----------------------------------------------------------------------+
+// | Created: miĆ© jun 18 15:08:05 ART 2003                                |
+// | Author:  Leandro Lucarella <llucar@mecon.gov.ar>                     |
+// +----------------------------------------------------------------------+
+//
+// $Id$
+//
+
+/**
+ * Agrega un path al include path.
+ *
+ * @param string $ip Include path a agregar antes del actual.
+ */
+function prepend_include_path($ip) {
+    $old = ini_get('include_path');
+    ini_set('include_path', "$ip:$old");
+}
+
+?>