PHP GTK short path

naguziki

New Member
I have the following PHP GTK code located in \[code\]C:\gtk\[/code\]\[code\]<?phpif (!class_exists('gtk')) { die("Please load the php-gtk2 module in your php.ini\r\n");}$wnd = new GtkWindow();$wnd->set_title('Background');$wnd->set_resizable(false);$wnd->set_position(GTK_WIN_POS_CENTER);$wnd->connect_simple('destroy', array('gtk', 'main_quit'));$im = GtkImage::new_from_file("C:\gtk\bg.jpg");$wnd->add($im);$wnd->show_all();Gtk::main();?>\[/code\]It shows the image \[code\]C:\gtk\bg.jpg\[/code\] but my question is how can I display it from a local path. The PHP file is located in that folder so I should only have to type \[code\]bg.jpg\[/code\] but that doesn't work.
 
Back
Top