jnerotrix Posted December 5, 2008 Share Posted December 5, 2008 I get this error Parse error: syntax error, unexpected '}', expecting ',' or ';' in /www/rack111.com/m/y/t/mytestsite/htdocs/other.php on line 20 In this code <?php error_reporting(0); $ip = $_SERVER['REMOTE_ADDR']; $useripdata = '/ip/' . $ip .'.txt'; if (file_exists($useripdata)) { foreach (file('/ip/' . $ip . '.txt') as $line) { echo '$' . $line; for ($i=0; $i < $numTimes; $i++) { echo 'WElcome x$numTimes'; } echo "<meta http-equiv='refresh' content='$reloadtime' url='index.php'>;" } else { Link to comment https://forums.phpfreaks.com/topic/135598-solved-unexpected-expecting-or/ Share on other sites More sharing options...
trq Posted December 5, 2008 Share Posted December 5, 2008 Your missing a closing } around your for loop. Also, I don't see anywhere where you define $numTimes, or $reloadtime. Simply reading strings from a text string and appending $ to them does not turn them into vairables, they are still simply strings. Link to comment https://forums.phpfreaks.com/topic/135598-solved-unexpected-expecting-or/#findComment-706448 Share on other sites More sharing options...
kenrbnsn Posted December 5, 2008 Share Posted December 5, 2008 You're missing the terminating semi-colon at the end of this line: <?php echo "<meta http-equiv='refresh' content='$reloadtime' url='index.php'>;" ?> Ken Link to comment https://forums.phpfreaks.com/topic/135598-solved-unexpected-expecting-or/#findComment-706455 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.