2
@Drupal: how to access to Drupal's APIs with a standalone php script? 지침을 따랐지만 검색 쿼리 결과가 0 (빈 배열)입니다. Drupal 웹 페이지에서 동일한 검색어가 실행되면 결과가 반환된다는 사실을 확인했습니다.독립 실행 형 PHP 페이지에서 Drupal 검색을 사용하는 방법?
<?php
chdir("drupal");
define("DRUPAL_ROOT",".");
require_once './includes/bootstrap.inc';
include 'drupal/modules/search/search.api.php';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$keys = array("harry","potter");
$result = hook_search_execute($keys);
print_r($result);
?>
아무도 왜 이것이 작동하지 않는지에 대한 몇 가지 지침을 줄 수 있습니까? 많은 감사합니다!