overfloweblog
are you driving me crazy?
  • Home
  • About
  • dev
  • gallery
  • music
  • bookmark
Browse: Home / serverScript

serverScript

Shorthand If / Else Examples

By overflow on April 1, 2008

출처 요기 http://davidwalsh.name/javascript-shorthand-if-else-examples ——————————————————- Basic True / False Declaration $is_admin = ($user['permissions'] == ‘admin’ ? true : false); ——————————————————- Conditional Welcome Message echo ‘Welcome ‘.($user['is_logged_in'] ? $user['first_name'] : ‘Guest’).’!’; ——————————————————- Conditional Items Message echo ‘Your cart contains ‘.$num_items.’ item’.($num_items != 1 ? ‘s’ : ”).’.’; ——————————————————- Conditional Error Reporting Level error_reporting($WEBSITE_IS_LIVE ? 0 : E_STRICT); [...]

| Tagged serverScript, shorthand | Leave a response

Fancy URL (Search Engine-Friendly URLs)

By overflow on April 1, 2008

http://www.webmasterbase.com/article.php/999/12   아파치를 이용해서 위와 같은 url로 스크립트를 실행시킬 수 있는 3가지 방법에 대해 알아보겠습니다.   1. 아파치의 look back 기능을 이용한다. 아파치는 기본적으로 사용자가 요청한 리소스가 없을 경우 backward 방식으로 url을 탐색합니다. “http://www.webmasterbase.com/article.php/999/12” URL의 경우 12라는 디렉토리나 파일이 없으면 다시 999라는 디렉토리나 파일을 찾고 그것도 없으면 article.php를 실행하게 되죠.   따라서 “http://www.webmasterbase.com/article.php?article=999&number=12” 와 같은 [...]

| Tagged fancy url, serverScript | Leave a response

Copyright © 2010 overfloweblog.

Powered by WordPress and Hybrid.