|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-23 16:30 UTC] epplestun at alaplaya dot com
the script:
class php_eddi_dev
{
var $gui;
var $modulos; //cargador de las interfaces de los m?dulos.
var $interface; //cargador de interfaz principal.
// {{{ delete_event()
/**
* Constructor de la clase, genera el array gui global, la variable global interface que contendra la interface XML y carga la liberia PHP-GTK.
*
* @return void
*/
function php_eddi_dev()
{
dl(stristr(PHP_OS, "WIN") ? "php_gtk.dll" : "php_gtk.so");
$this->gui = array();
$this->modulos = array();
$this->interface = &new GladeXML("php-eddi-dev.glade");
}
// }}}
// {{{ salir()
/**
* Se encarga de cerrar la aplicacion GTK.
*
* @return void
*/
function salir()
{
Gtk::main_quit();
}
// }}}
// {{{ cargador_de_modulos()
/**
* Se encarga de cargar los modulos adicionales del PHP-EDDI-DEV.
*
* @return void TODO
*/
function cargador_de_modulos()
{
$handle = opendir("modulos/");
while ($directorio = readdir($handle)) {
if ($directorio != "." AND $directorio != "..")
{
if(!is_dir($directorio))
{
echo filetype($directorio) . "\n";
}
}
}
}
// }}}
// {{{ main()
/**
* Se encarga de configurar y de lanzar la aplicaci?n.
*
* @return void
*/
function main()
{
$this->gui['Gtk_Window'] = $this->interface->get_widget('ide');
$this->gui['Gtk_Window']->connect('destroy',array(&$this,'salir'));
$this->gui['Gtk_Window']->set_usize(600,400);
/**
* Asignamos a la variable global color un color.
*/
$this->gui['color'] = new GdkColor('#898989');
/**
* Creamos un estilo nuevo que se le aplicara a $this->gui['Gtk_Fixed'].
*/
$this->gui['estilo'] = new GtkStyle();
$this->gui['estilo']->bg[GTK_STATE_NORMAL] = $this->gui['color'];
/**
* Recogemos el widget de glade y le aplicamos el estilo.
*/
$this->gui['Gtk_Fixed'] = $this->interface->get_widget('entorno_desarrollo');
$this->gui['Gtk_Fixed']->set_style($this->gui['estilo']);
gtk::main();
}
// }}}
}
$programa = &new php_eddi_dev;
//$programa->main();
$programa->cargador_de_modulos();
--------------------------------------------------------------
Running PHP 4.1.2
Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies
[PHP Modules]
xml
wddx
standard
sockets
session
posix
pcre
mysql
ftp
dbx
[Zend Modules]
Not Implemented
The problem is:
When I call to the function cargador_de_modulos() supposedly to show to me the directories of path that goes to the function opendir() to him but gives a warning me.
<b>Warning</b>: lstat failed for prueba (errno=2 - No existe el fichero o el directorio) in <b>/root/php-eddi-dev/tests/php-eddi-dev/php-eddi-dev.php</b> on line <b>80</b><br>/root/php-eddi-dev/tests/php-eddi-dev/php-eddi-dev.php(80) : Warning - lstat failed for prueba (errno=2 - No existe el fichero o el directorio)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 12:00:01 2025 UTC |
excuse me i found the error :) if(!is_dir("modulos/".$directorio))