Re: GladeXML and relative path

From: Date: Sat, 17 Nov 2001 19:12:10 +0000
Subject: Re: GladeXML and relative path
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-602@lists.php.net to get a copy of this message
Seems to be a win32 problem only. Some testing showed that c-system function 'getcwd()' spits out the directory of the script under linux but the directory from the shell prompt under win32. Frank, any idea? On Sat, Nov 17, 2001 at 05:14:32PM +0100, Urs Gehrig wrote : > dear all > > while trying to load a glade file it occurred, that it would work under the > condition: > > a) > c:\php-gtk\php.exe > c:\php-gtk\gtk-glade.php > $g = &new GladeXML("dialog.glade"); // line within gtk-glade.php > c:\php-gtk\dialog.glade > > c:\php-gtk\>php -q gtk-glade.php > > but it did not work under the condition, that the glade file is in any other > location than the dialog.glade file, like: > > b) > c:\php-gtk\php.exe > c:\php-gtk\projects\glade\gtk-glade.php > $g = &new GladeXML("dialog.glade"); // line within gtk-glade.php > or > $g = &new GladeXML("./dialog.glade"); // line within gtk-glade.php > c:\php-gtk\projects\glade\dialog.glade > > C:\PHP-GTK>php -q C:\PHP-GTK\projects\glade\gtk-glade.php > ----> produces: warning: failed to load external entity "./dialog.glade" > > so, actually i would have expected, that the glade file would be found, if > it is in the same directory as the gtk-glade.php file itself. but this does > not seem to work. maybe i am wrong. but at least, this would be the way, i > intuitively would call the glade file. > > well, that would not be that much a problem, if i could use something like > $GLOBALS[PATH_TRANSLATED] to point for the glade file. but since this is not > online-called file but calle through command line, PATH_TRANSLATED does not > seam to be defined at all.

« previous php.gtk.general (#602) next »