我試圖上面的代碼來設置消息和重定向到一個不同的位置這樣 和即時從Drupal的6組消息發送到不同的自舉
example.com/somewere/index.php
重定向到
example.com
我的問題是,當我到達example.com Drupal doesen't保持會話, 和消息不顯示。
任何想法將不勝感激。
chdir('../');
require_once './includes/bootstrap.inc';
require_once './includes/common.inc';
require_once './includes/module.inc';
$url = "http://".$_SERVER['SERVER_NAME'];
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
drupal_set_message(t('Your message has been sent'), 'status', TRUE);
drupal_goto($url);
我正在採取一個窗體和頁面的其他元素,並把它放在啓動會話的引導程序之外的drupal。
在 example.com/somewere/ 我的消息有
但example.com/ 我沒有得到消息
服務器打開我指出錯誤會話 可以說,它是因爲我在example.com/somewere/中使用不同的htaccess文件
我知道消息是基於會話的 有沒有辦法繞過問題,因爲在同一個域和相同的drupal只是不同的訪問位置?
我會檢查它thenks。 – aViNoAm