简体   繁体   中英

Drupal node_form undefined function

When I run node_form() in my module I get the following error: *Fatal error: Call to undefined function node_form()*

Is there some special context required to use this function, because I can't work out why it would be undefined when the API reference says that it's defined in modules/node/node.pages.inc

默认情况下不包含该特定文件,因此您需要手动执行此操作:

module_load_include('inc', 'node', 'node.pages');

您可以使用drupal_get_form而不是node_form

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM