You are here

function fckeditor_resolve_url in FCKeditor - WYSIWYG HTML editor 6.2

Emulates the asp Server.mapPath function. Given an url path return the physical directory that it corresponds to.

Returns absolute path or false on failure

Parameters

string $path:

Return value

@return string|boolean

1 call to fckeditor_resolve_url()
fckeditor_path in ./fckeditor.module
Read FCKeditor path from Global profile

File

./fckeditor.lib.inc, line 85
FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben

Code

function fckeditor_resolve_url($path) {
  if (function_exists('apache_lookup_uri')) {
    $info = @apache_lookup_uri($path);
    if (!$info) {
      return FALSE;
    }
    return $info->filename . $info->path_info;
  }
  $document_root = fckeditor_get_document_root_full_path();
  if ($document_root !== FALSE) {
    return $document_root . $path;
  }
  return FALSE;
}