- Timestamp:
- 2007/08/06 14:34:07 (17 years ago)
- Location:
- branches/feature-module-update
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/pages/LC_Page.php
r15210 r15213 194 194 } 195 195 } 196 197 // $path が / で始まっている場合 198 if (substr($path, 0, 1) == "/") { 199 $realPath = realpath(HTML_PATH . substr_replace($path, "", 0, 1)); 200 } else { 201 // 相対パスの場合 202 $realPath = realpath($path); 203 } 204 196 205 // DocumentRoot を削除した文字列を取得. 197 $root = str_replace($documentRoot, "", realpath($path));206 $root = str_replace($documentRoot, "", $realPath); 198 207 // 先頭の / を削除 199 208 $root = substr_replace($root, "", 0, 1); 200 201 209 if ($useSSL) { 202 210 $url = SSL_URL . $root; -
branches/feature-module-update/test/class/page/LC_Page_Test.php
r15118 r15213 126 126 * LC_Page::getLocation() のテストケース. 127 127 * 128 * 絶対パス 129 */ 130 function testGetLocationWithFullPath() { 131 $objPage = new LC_Page(); 132 $_SERVER['DOCUMENT_ROOT'] = realpath("../html"); 133 $url = $objPage->getLocation("/abouts/index.php"); 134 135 $this->assertEquals(SITE_URL . "abouts/index.php", $url); 136 unset($_SERVER['DOCUMENT_ROOT']); 137 } 138 139 /** 140 * LC_Page::getLocation() のテストケース. 141 * 128 142 * QueryString 付与 129 143 */
Note: See TracChangeset
for help on using the changeset viewer.