Syndicate content

Reply to comment

Absolute paths in PHP and Drupal

Here I'm going to show you some absolute paths in PHP and Drupal that you might need.Absolute path to website rootrealpath( '.' )Absolute path to files directory in Drupalrealpath( file_directory_path() )Absolute path to current directory (from which the scipt is being run)realpath( dirname(__FILE__) )Absolute path to the systems temporary directory (PHP 5)realpath(sys_get_temp_dir()) 

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <abbr>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
four + five =
Solve this math question and enter the solution with digits. E.g. for "two plus four = ?" enter "6".