Drupal: how to access to Drupal's APIs with a standalone php script?

前端 未结 4 1260
南旧
南旧 2020-12-06 06:40

When I create a new script in a separate php file to run for Drupal, I need to add the following lines on top in order to access all Drupal APIs:

require_once \'./in

4条回答
  •  再見小時候
    2020-12-06 07:25

    yes, it's one way to enter drupal api.
    Sometime chdir("dir to drupal dir"); required, if you call php script from other directory.

提交回复
热议问题