dtxooq1020 2013-09-03 10:14
浏览 76
已采纳

TYPO3:何时/如何使用define('TYPO3_MODE','FE');

/public_html/demo is my TYPO3 site, i put a test.php file under it,

<?php
//define('TYPO3_MODE','FE');

require('typo3conf/localconf.php');
require('t3lib/class.t3lib_db.php');
require('t3lib/class.t3lib_div.php');

define('TYPO3_db_host', $typo_db_host);
define('TYPO3_db_username', $typo_db_username);
define('TYPO3_db_password', $typo_db_password);
define('TYPO3_db', $typo_db);


$DB = new t3lib_DB();
$DB->connectDB();
$result = mysql_query("SELECT * FROM fe_users WHERE username='tom_seeker'");
while($row = mysql_fetch_array($result))
{
    echo $row['email'];
}

?>

Question:

when need to put this line: define('TYPO3_MODE','FE');? Here i comment it out, and script still works, so i just wonder when/how to use define('TYPO3_MODE','FE');?

  • 写回答

2条回答 默认 最新

  • dtukyb8095 2013-09-03 13:38
    关注

    There should be no need to define this constant. TYPO3 will do it for you.

    Either build a plugin you can put on your site, or an eID that does not need a site to function. Both will give you the TYPO3 environment; the plugin a full one, the eID a smaller (and faster) one.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效