中を見ることができるように、URLからsfWebRequest.class.php
をgetPathInfo()
削除しました:$relativeUrlRoot
$pathInfo = $pathArray[$sf_path_info_key];
if ($relativeUrlRoot = $this->getRelativeUrlRoot())
{
$pathInfo = preg_replace('/^'.str_replace('/', '\\/', $relativeUrlRoot).'\//', '', $pathInfo);
}
$relativeUrlRoot
URLからコントローラー名を削除するこの関数からです。
public function getRelativeUrlRoot()
{
if (null === $this->relativeUrlRoot)
{
if (!($this->relativeUrlRoot = $this->getOption('relative_url_root')))
{
$this->relativeUrlRoot = preg_replace('#/[^/]+\.php5?$#', '', $this->getScriptName());
}
}
return $this->relativeUrlRoot;
}
したがって、myapp_dev.php/main
またはを持っている場合index.php/main
は、常に。を取得し/main
ます。
の前にフルパスが必要な場合/main
は、も呼び出す必要があります$this->request->getScriptName()
。
注意してください、ドメインとパス情報の間のすべてgetScriptName()
を返します。がある場合は、次を返します。http://exemple.com/somepath/app_dev.php/main
getScriptName()
/somepath/app_dev.php