php outputs sourcecode instead of running nginx -
i have showing on site. lang function showing on web, not runned should run on site. server running nginx
q: why doing that, , how can prevented?
content of file:
<? function lang($line) { $ci = & get_instance(); $languagevariable = explode(" ", $line); $outcome = ''; foreach($languagevariable $langline) { $outcome .= $ci->lang->line($langline); } return $outcome; } function langw($string, $var1 = false, $var2 = false, $var3 = false) { return sprintf(lang($string), ($var1 ? $var1 : ''), ($var2 ? $var2 : '')); } function langv($line, $var) { $ci = & get_instance(); return sprintf($ci->lang->line($line), $var); }
make sure have:
short_open_tag=on
in php.ini, restart nginx server
http://php.net/manual/en/ini.core.php#ini.short-open-tag
if can't edit php.ini, can either replace <?
<?php
(not best..) or add following .htaccess
file in document root:
php_value short_open_tag 1
remember hosting have disabled option, it's not 100% guaranteed .htaccess way works.
Comments
Post a Comment