为什么php标签没有在drupal中关闭?

前端之家收集整理的这篇文章主要介绍了为什么php标签没有在drupal中关闭?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
这是index.PHP中的代码,只有<?PHP,但没有?>,这是我第一次看到这样的代码,有什么原因吗?
  1. <?PHP
  2. // $Id: index.PHP,v 1.94 2007/12/26 08:46:48 dries Exp $
  3.  
  4. /**
  5. * @file
  6. * The PHP page that serves all page requests on a Drupal installation.
  7. *
  8. * The routines here dispatch control to the appropriate handler,which then
  9. * prints the appropriate page.
  10. *
  11. * All Drupal code is released under the GNU General Public License.
  12. * See COPYRIGHT.txt and LICENSE.txt.
  13. */
  14.  
  15. require_once './includes/bootstrap.inc';
  16. drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  17.  
  18. $return = menu_execute_active_handler();
  19.  
  20. // Menu status constants are integers; page content is a string.
  21. if (is_int($return)) {
  22. switch ($return) {
  23. case MENU_NOT_FOUND:
  24. drupal_not_found();
  25. break;
  26. case MENU_ACCESS_DENIED:
  27. drupal_access_denied();
  28. break;
  29. case MENU_SITE_OFFLINE:
  30. drupal_site_offline();
  31. break;
  32. }
  33. }
  34. elseif (isset($return)) {
  35. // Print any value (including an empty string) except NULL or undefined:
  36. print theme('page',$return);
  37. }
  38.  
  39. drupal_page_footer();
省略结束标记可防止意外将尾随空白空间注入响应中.

在某些框架中是常见的编码实践,如Zend.

猜你在找的PHP相关文章