Welcome Guest, Not a member yet? Register   Sign In
HEREDOC in language files
#1

[eluser]Geoffrey[/eluser]
I find I'm unable to use HEREDOC syntax in the language files.

I've found it's failing at line 102 of system/core/Lang.php
Code:
include($package_path.'language/'.$idiom.'/'.$langfile);

ideas?
#2

[eluser]Geoffrey[/eluser]
Doing a test of the following also has the problem so I guess it's a php bug rather than CI.
Code:
<?php
include("application/language/english/conference_lang.php");
echo "<pre>";
print_r($lang);
echo "</pre>";

I'm getting the following errors in my apache logs
Code:
PHP Parse error:  parse error, expecting `T_VARIABLE' or `T_END_HEREDOC' or `T_DOLLAR_OPEN_CURLY_BRACES' or `T_CURLY_OPEN'


#3

[eluser]Geoffrey[/eluser]
Damnit. I had the following at the top of the file which was my problem.

Code:
if (!defined('BASEPATH')) exit('No direct script access allowed');

Removed and now it's working.




Theme © iAndrew 2016 - Forum software by © MyBB