Help us understand the problem. What is going on with this article?

Drupalのpath.incでよく使うやつ

More than 3 years have passed since last update.

地味に便利:open_mouth:

$GLOBALS['base_url'] => http://example.com/drupal
base_path() => /drupal/
request_uri() => /drupal/documentation?page=1
request_path() => documentation
current_path() => node/26419

参考

function current_path
Drupal API path.inc

Kenji_TAJIMA
Web系エンジニア。JavaとPHPを得意言語とする。Javaでの保険3社統合大型案件やPHPでの短期開発を経て、CMSをフレームワークとした開発に精進。その後は主にマネジメントと要件定義に従事。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away