GladeXML and relative path
| From: | Urs Gehrig | Date: | Sat, 17 Nov 2001 16:14:32 +0000 |
| Subject: | GladeXML and relative path | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-601@lists.php.net to get a copy of this message | ||
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.
best regards, urs