Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>pathInfo</strong> <a href="http://www.yiiframework.com/doc/api/1.1/CHttpRequest#pathInfo-detail" rel="nofollow">Yii Class Referenсe | CHttpRequest#pathInfo</a></p> <blockquote> <p>Returns the path info of the currently requested URL. This refers to the part that is after the entry script and before the question mark. The starting and ending slashes are stripped off.</p> </blockquote> <p>E.g. your URL looks like </p> <pre><code>http://example.com/index.php/abc/def/?qwe=123 </code></pre> <p>Then your "pathInfo" will look like</p> <pre><code>abc/def </code></pre> <p><strong>baseUrl</strong> <a href="http://www.yiiframework.com/doc/api/1.1/CHttpRequest#baseUrl-detail" rel="nofollow">Yiic Class Referenсe | CHttpRequest#baseUrl</a></p> <blockquote> <p>Returns the relative URL for the application. This is similar to scriptUrl except that it does not have the script file name, and the ending slashes are stripped off.</p> </blockquote> <p>To understand it please refer to <a href="http://www.yiiframework.com/doc/api/1.1/CHttpRequest" rel="nofollow">CHttpRequest</a> docs and to <a href="http://php.net/manual/en/reserved.variables.server.php" rel="nofollow">$_SERVER</a> docs.</p> <pre><code>public function getBaseUrl($absolute=false) { if($this-&gt;_baseUrl===null) $this-&gt;_baseUrl=rtrim(dirname($this-&gt;getScriptUrl()),'\\/'); return $absolute ? $this-&gt;getHostInfo() . $this-&gt;_baseUrl : $this-&gt;_baseUrl; } </code></pre> <p>and</p> <pre><code>public function getScriptUrl() { if($this-&gt;_scriptUrl===null) { $scriptName=basename($_SERVER['SCRIPT_FILENAME']); if(basename($_SERVER['SCRIPT_NAME'])===$scriptName) $this-&gt;_scriptUrl=$_SERVER['SCRIPT_NAME']; elseif(basename($_SERVER['PHP_SELF'])===$scriptName) $this-&gt;_scriptUrl=$_SERVER['PHP_SELF']; elseif(isset($_SERVER['ORIG_SCRIPT_NAME']) &amp;&amp; basename($_SERVER['ORIG_SCRIPT_NAME'])===$scriptName) $this-&gt;_scriptUrl=$_SERVER['ORIG_SCRIPT_NAME']; elseif(($pos=strpos($_SERVER['PHP_SELF'],'/'.$scriptName))!==false) $this-&gt;_scriptUrl=substr($_SERVER['SCRIPT_NAME'],0,$pos).'/'.$scriptName; elseif(isset($_SERVER['DOCUMENT_ROOT']) &amp;&amp; strpos($_SERVER['SCRIPT_FILENAME'],$_SERVER['DOCUMENT_ROOT'])===0) $this-&gt;_scriptUrl=str_replace('\\','/',str_replace($_SERVER['DOCUMENT_ROOT'],'',$_SERVER['SCRIPT_FILENAME'])); else throw new CException(Yii::t('yii','CHttpRequest is unable to determine the entry script URL.')); } return $this-&gt;_scriptUrl; } </code></pre> <p>and</p> <blockquote> <p>'SCRIPT_NAME' Contains the current script's path. This is useful for pages which need to point to themselves. The <strong>FILE</strong> constant contains the full path and filename of the current (i.e. included) file.</p> <p>'SCRIPT_FILENAME' The absolute pathname of the currently executing script.</p> </blockquote> <p>E.g. your URL looks like </p> <pre><code>http://example.com/index.php/abc/def/?qwe=123 </code></pre> <p>Then your "baseUrl" will look like empty string ("") because</p> <pre><code>1. $_SERVER['SCRIPT_NAME'] is "/index.php" 2. Yii::app()-&gt;request-&gt;getScriptUrl() is "/index.php" 3. Yii::app()-&gt;request-&gt;getBaseUrl() is "" </code></pre> <p>E.g. your URL looks like (imagine that you put your application not in a root web folder for current host but in a subfolder "customfolder")</p> <pre><code>http://example.com/customfolder/index.php/abc/def/?qwe=123 </code></pre> <p>Then your "baseUrl" will look like "/customfolder" because</p> <pre><code>1. $_SERVER['SCRIPT_NAME'] is "/customfolder/index.php" 2. Yii::app()-&gt;request-&gt;getScriptUrl() is "/customfolder/index.php" 3. Yii::app()-&gt;request-&gt;getBaseUrl() is "/customfolder" </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload