如何在codeigniter中启用短标签语法? [英] How do you enable short-tag syntax in codeigniter?

查看:115
本文介绍了如何在codeigniter中启用短标签语法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程式(CodeIgniter)使用

I have an app (CodeIgniter) that uses the

<?=$variable?>

语法而不是

<?php echo $variable; ?>

,我想在我的本地主机上工作。我需要在我的php.ini文件中启用这是什么?

and I would like for it to work on my local host. What is it that I need to enable in my php.ini file to do this?

请注意,我不是要求如何启用short_open_tag,

Please note, I am not asking how to enable short_open_tag, but how to enable this in CodeIgniter.

提前感谢。

推荐答案

在CodeIgniter config.php

In CodeIgniter's config.php:

/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
|--------------------------------------------------------------------------
|
| If your PHP installation does not have short tag support enabled CI
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
| in your view files.  Options are TRUE or FALSE (boolean)
|
*/
$config['rewrite_short_tags'] = FALSE;

这也意味着它不是主机相关的。

This will also mean that it isn't host dependent.

这篇关于如何在codeigniter中启用短标签语法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆