Re: GtkText
| From: | nathan at the-ring dot homelinux dot net | Date: | Fri, 14 May 2004 12:28:35 +0000 |
| Subject: | Re: GtkText | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-4485@lists.php.net to get a copy of this message | ||
> Trying to use GtkText boxes and write it value to a file but having some
> problems extracting it. Would anyone mind having a quick look?
have a look to http://gtk.php.net/manual/fr/gtk.gtktext.php
you can modify your code this way:
function write_message(){
$filename = 'C:\messages\test.txt';
$handle = fopen($filename, 'w'); // open \ create in write mode
$device_name = $GLOBALS['device']->get_chars(0,-1); //get the $device
content
# you may need to use utf8_decode for specials chars to be correctly
retrieved
$device_name = utf8_decode($device_name);
fwrite($handle, $device_name); // write to file
fclose($handle); // close file when done
}
this should work,
nathan