Spikowski Posted November 17, 2007 Share Posted November 17, 2007 The problem happens when i send data via an attached php file to the page, it does not display characters as it should. <?php if(isset($_GET['sec']) && $_GET['sec'] != null) { switch($_GET['sec']){ case 1: require('asd.php'); break; case 2: require('asdasd.php'); break; case 3: require('qwe.php'); break; case 4: require('qweqwe.php'); break; default: require('rty.php'); break; } } else { require('yui.php'); } ?> i dont know what the problem is, if i write something in the html file it displays correctly. Thanks for any help. Quote Link to comment Share on other sites More sharing options...
rarebit Posted November 17, 2007 Share Posted November 17, 2007 Warning Windows versions of PHP prior to PHP 4.3.0 do not support accessing remote files via this function, even if allow_url_fopen is enabled. from: http://uk3.php.net/manual/en/function.require.php This probably isn't your problem, but... What's inside the files? P.S. Use code tags! (#) Quote Link to comment Share on other sites More sharing options...
Spikowski Posted November 17, 2007 Author Share Posted November 17, 2007 there is only some div tags and text nothing more, and i have PHP 5 Quote Link to comment Share on other sites More sharing options...
rarebit Posted November 17, 2007 Share Posted November 17, 2007 When you say, there's only some html, is this echo'd or just loose? (only a q?) Quote Link to comment Share on other sites More sharing options...
Spikowski Posted November 17, 2007 Author Share Posted November 17, 2007 Im using echo Quote Link to comment Share on other sites More sharing options...
Dragen Posted November 17, 2007 Share Posted November 17, 2007 What should it display and what is it displaying? Quote Link to comment Share on other sites More sharing options...
Spikowski Posted November 17, 2007 Author Share Posted November 17, 2007 Insed diplaying the correct characters (śłą...) i displays ?, it works fine i i dont use the php files to include teh content Quote Link to comment Share on other sites More sharing options...
Spikowski Posted November 19, 2007 Author Share Posted November 19, 2007 can someoen please tell me waht is wrong here? it doesnt dsplay the characters as it should i only displays '?' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="pl"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" /> <meta http-equiv="Content-Language" content="pl" /> </head> <body> Śiemaż źłó szko ś ćielisz </body> </html> thanks Quote Link to comment Share on other sites More sharing options...
aschk Posted November 19, 2007 Share Posted November 19, 2007 By the way you have a m00t test in there: if(isset($_GET['sec']) && $_GET['sec'] != null) { If $_GET['sec'] IS SET then it will ALWAYS be NOT null. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.