jnerotrix Posted December 5, 2008 Share Posted December 5, 2008 I get This Error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /www/rack111.com/m/y/t/mytestsite/htdocs/other.php on line 11 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; } ?> Link to comment https://forums.phpfreaks.com/topic/135596-solved-unexpected-t_constant_encapsed_string/ Share on other sites More sharing options...
trq Posted December 5, 2008 Share Posted December 5, 2008 <?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; } ?> Link to comment https://forums.phpfreaks.com/topic/135596-solved-unexpected-t_constant_encapsed_string/#findComment-706441 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.