Changeset 12039 for branches/comu/data/lib/slib.php
- Timestamp:
- 2007/03/31 21:59:45 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu/data/lib/slib.php
r11984 r12039 261 261 if(!defined('ECCUBE_INSTALL')) { 262 262 if(!ereg("/install/", $_SERVER['PHP_SELF'])) { 263 header("Location: ./install/");263 header("Location: " . sfGetCurrentUri() . "/install/"); 264 264 } 265 265 } else { … … 2917 2917 } 2918 2918 2919 /** 2920 * ¸½ºß¤Î URI ¤ò¼èÆÀ¤¹¤ë. 2921 * 2922 * <p> 2923 * $_SERVER["SERVER_PORT"] ¤¬ 443 ¤Î¾ì¹ç¤Ï, ¥¹¥¡¼¥Þ¤Ë https:// ¤ò»ÈÍÑ. 2924 * ¤½¤ì°Ê³°¤Ï http:// ¤ò»ÈÍѤ¹¤ë. 2925 * <strong>URI ËöÈø¤Î / ¤Ïºï½ü¤µ¤ì¤Þ¤¹.</strong> 2926 * </p> 2927 * @param boolean $hasFileName ¥Õ¥¡¥¤¥ë̾¤ò´Þ¤á¤ë¾ì¹ç true 2928 * @return string ¸½ºß¤Î URI 2929 */ 2930 function sfGetCurrentUri($hasFileName = false) { 2931 $host = $_SERVER["HTTP_HOST"]; 2932 $path = rtrim(dirname($_SERVER["SCRIPT_NAME"]), "/\\"); 2933 2934 if ($hasFileName === true) { 2935 return sfGetCurrentSchema() . $host . $_SERVER["SCRIPT_NAME"]; 2936 } else { 2937 return sfGetCurrentSchema() . $host . $path; 2938 } 2939 } 2940 2941 /** 2942 * ¸½ºß¤Î ¥¹¥¡¼¥Þ̾¤òÊÖ¤¹. 2943 * 2944 * <p> 2945 * $_SERVER["SERVER_PORT"] ¤¬ 443 ¤Î¾ì¹ç¤Ï, https:// ¤òÊÖ¤¹. 2946 * ¤½¤ì°Ê³°¤Ï http:// ¤òÊÖ¤¹. 2947 * </p> 2948 * @return string http:// ¤Þ¤¿¤Ï https:// ¤Î string. 2949 */ 2950 function sfGetCurrentSchema() { 2951 2952 if ($_SERVER["SERVER_PORT"] == 443) { 2953 return "https://"; 2954 } else { 2955 return "http://"; 2956 } 2957 } 2958 2919 2959 /* ¥Ç¥Ð¥Ã¥°ÍÑ ------------------------------------------------------------------------------------------------*/ 2920 2960 function sfPrintR($obj) {
Note: See TracChangeset
for help on using the changeset viewer.