
January 14th, 2004, 06:37 PM
|
|
Junior Member
|
|
Join Date: Jan 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
parse error pls help!
im still trying to learn php, but cant figure out what to do with this code. ive tried looking everywhere. i keep getting this error
Parse error: parse error in xxx/charset_conversion.lib.php on line 282
PHP Code:
function PMA_convert_file($src_charset, $dest_charset, $file) {
switch ($GLOBALS['PMA_recoding_engine']) {
case PMA_CHARSET_RECODE:
case PMA_CHARSET_ICONV:
case PMA_CHARSET_LIBICONV:
$tmpfname = tempnam('', 'PMA_convert_file');
$fin = fopen($file, 'r');
$fout = fopen($tmpfname, 'w');
if ($GLOBALS['PMA_recoding_engine'] == PMA_CHARSET_RECODE) {
recode_file($src_charset . '..' . $dest_charset, $fin, $fout);
} else {
while (!feof($fin)) {
$line = fgets($fin, 4096);
if ($GLOBALS['PMA_recoding_engine'] == PMA_CHARSET_ICONV) {
$dist = iconv($src_charset, $dest_charset . $GLOBALS['cfg']['IconvExtraParams'], $line);
} else {
$dist = libiconv($src_charset, $dest_charset, $line);
}
fputs($fout, $dist);
}
with this line being line 282:
PHP Code:
if ($GLOBALS['PMA_recoding_engine'] == PMA_CHARSET_ICONV) {
Thanks in advance
|