while($row = mysql_fetch_array($result)) {
$days[] = $row[0] ;
}
'프로그래밍 > PHP' 카테고리의 다른 글
| .htaccess 수정하여 index.php 파일 제거 (0) | 2009/05/04 |
|---|---|
| DB 내용 배열에 저장하기 (0) | 2009/04/26 |
| mysql 보안 (0) | 2009/04/22 |
| PHP URL 주소 받아오기 (0) | 2009/04/21 |
| .htaccess 수정하여 index.php 파일 제거 (0) | 2009/05/04 |
|---|---|
| DB 내용 배열에 저장하기 (0) | 2009/04/26 |
| mysql 보안 (0) | 2009/04/22 |
| PHP URL 주소 받아오기 (0) | 2009/04/21 |
| 중복을 최소로 하는 프로그래밍 하기 (4) | 2010/07/01 |
|---|---|
| CDATA !? (0) | 2009/04/22 |
| DB 내용 배열에 저장하기 (0) | 2009/04/26 |
|---|---|
| mysql 보안 (0) | 2009/04/22 |
| PHP URL 주소 받아오기 (0) | 2009/04/21 |
| MYSQL 여러 테이블에서 검색할때 (0) | 2009/04/20 |
| mysql 보안 (0) | 2009/04/22 |
|---|---|
| PHP URL 주소 받아오기 (0) | 2009/04/21 |
| MYSQL 여러 테이블에서 검색할때 (0) | 2009/04/20 |
| $_SERVER 변수 (0) | 2009/04/19 |
| PHP URL 주소 받아오기 (0) | 2009/04/21 |
|---|---|
| MYSQL 여러 테이블에서 검색할때 (0) | 2009/04/20 |
| $_SERVER 변수 (0) | 2009/04/19 |
| PHP mysql function 들 (0) | 2009/04/18 |
| 균열을 일으킨다. (0) | 2009/08/16 |
|---|---|
| CSS 리스트 가로 표시 (0) | 2009/04/19 |
| DIV 가운데 정렬 시키기 (3) | 2009/04/05 |
| 웹폰트 설치 방법 (0) | 2009/04/05 |
<?
$a1 = $_SERVER["REQUEST_URI"] ;
//웹 절대경로(?)
$a2 = $_SERVER["SCRIPT_NAME"];
$a3 = $_SERVER["PHP_SELF"] ;
//서버명
$a4 = $_SERVER["SERVER_NAME"] ;
$a5 = $_SERVER["HTTP_HOST"] ;
//웹서버 document 디렉토리
$a6 = $_SERVER["DOCUMENT_ROOT"];
//파일전체경로
$a7 = $_SERVER["PATH_TRANSLATED"] ;
$a8 = $_SERVER["SCRIPT_FILENAME"] ;
$a9 = __FILE__ ; //이건 좀 틀리져. 인클루드한 파일에서도
echo "
<br>
\$_SERVER[\"REQUEST_URI=\"] -> $a1 , $REQUEST_URI<br>
<br>
//웹 절대경로(?) <br>
\$_SERVER[\"SCRIPT_NAME\"] -> $a2 , $SCRIPT_NAME<br>
\$_SERVER[\"PHP_SELF\"] ->$a3 , $PHP_SELF<br>
<br>
//서버명 <br>
\$_SERVER[\"SERVER_NAME\"] ->$a4 ,$SERVER_NAME<br>
\$_SERVER[\"HTTP_HOST\"] ->$a5 , $HTTP_HOST<br>
<br>
//웹서버 document 디렉토리 <br>
\$_SERVER[\"DOCUMENT_ROOT\"] ->$a6 , $DOCUMENT_ROOT<br>
<br>
//파일전체경로 <br>
\$_SERVER[\"PATH_TRANSLATED\"] ->$a7 , $PATH_TRANSLATED<br>
\$_SERVER[\"SCRIPT_FILENAME\"] ->$a8 , $SCRIPT_FILENAME<br>
<br>
\__FILE__ ; //이건 좀 틀리져. 인클루드한 파일에서도 ->$a9 <br>
<br>
";
?>
| MYSQL 여러 테이블에서 검색할때 (0) | 2009/04/20 |
|---|---|
| $_SERVER 변수 (0) | 2009/04/19 |
| PHP mysql function 들 (0) | 2009/04/18 |
| PHP 파일업로드 구현시 보안문제 해결방안. (0) | 2009/04/17 |
PHP: indicates the earliest version of PHP that supports the function.
| Function | Description | PHP |
|---|---|---|
| mysql_affected_rows() | Returns the number of affected rows in the previous MySQL operation | 3 |
| mysql_change_user() | Deprecated. Changes the user of the current MySQL connection | 3 |
| mysql_client_encoding() | Returns the name of the character set for the current connection | 4 |
| mysql_close() | Closes a non-persistent MySQL connection | 3 |
| mysql_connect() | Opens a non-persistent MySQL connection | 3 |
| mysql_create_db() | Deprecated. Creates a new MySQL database. Use mysql_query() instead | 3 |
| mysql_data_seek() | Moves the record pointer | 3 |
| mysql_db_name() | Returns a database name from a call to mysql_list_dbs() | 3 |
| mysql_db_query() | Deprecated. Sends a MySQL query. Use mysql_select_db() and mysql_query() instead | 3 |
| mysql_drop_db() | Deprecated. Deletes a MySQL database. Use mysql_query() instead | 3 |
| mysql_errno() | Returns the error number of the last MySQL operation | 3 |
| mysql_error() | Returns the error description of the last MySQL operation | 3 |
| mysql_escape_string() | Deprecated. Escapes a string for use in a mysql_query. Use mysql_real_escape_string() instead | 4 |
| mysql_fetch_array() | Returns a row from a recordset as an associative array and/or a numeric array | 3 |
| mysql_fetch_assoc() | Returns a row from a recordset as an associative array | 4 |
| mysql_fetch_field() | Returns column info from a recordset as an object | 3 |
| mysql_fetch_lengths() | Returns the length of the contents of each field in a result row | 3 |
| mysql_fetch_object() | Returns a row from a recordset as an object | 3 |
| mysql_fetch_row() | Returns a row from a recordset as a numeric array | 3 |
| mysql_field_flags() | Returns the flags associated with a field in a recordset | 3 |
| mysql_field_len() | Returns the maximum length of a field in a recordset | 3 |
| mysql_field_name() | Returns the name of a field in a recordset | 3 |
| mysql_field_seek() | Moves the result pointer to a specified field | 3 |
| mysql_field_table() | Returns the name of the table the specified field is in | 3 |
| mysql_field_type() | Returns the type of a field in a recordset | 3 |
| mysql_free_result() | Free result memory | 3 |
| mysql_get_client_info() | Returns MySQL client info | 4 |
| mysql_get_host_info() | Returns MySQL host info | 4 |
| mysql_get_proto_info() | Returns MySQL protocol info | 4 |
| mysql_get_server_info() | Returns MySQL server info | 4 |
| mysql_info() | Returns information about the last query | 4 |
| mysql_insert_id() | Returns the AUTO_INCREMENT ID generated from the previous INSERT operation | 3 |
| mysql_list_dbs() | Lists available databases on a MySQL server | 3 |
| mysql_list_fields() | Deprecated. Lists MySQL table fields. Use mysql_query() instead | 3 |
| mysql_list_processes() | Lists MySQL processes | 4 |
| mysql_list_tables() | Deprecated. Lists tables in a MySQL database. Use mysql_query() instead | 3 |
| mysql_num_fields() | Returns the number of fields in a recordset | 3 |
| mysql_num_rows() | Returns the number of rows in a recordset | 3 |
| mysql_pconnect() | Opens a persistent MySQL connection | 3 |
| mysql_ping() | Pings a server connection or reconnects if there is no connection | 4 |
| mysql_query() | Executes a query on a MySQL database | 3 |
| mysql_real_escape_string() | Escapes a string for use in SQL statements | 4 |
| mysql_result() | Returns the value of a field in a recordset | 3 |
| mysql_select_db() | Sets the active MySQL database | 3 |
| mysql_stat() | Returns the current system status of the MySQL server | 4 |
| mysql_tablename() | Deprecated. Returns the table name of field. Use mysql_query() instead | 3 |
| mysql_thread_id() | Returns the current thread ID | 4 |
| mysql_unbuffered_query() | Executes a query on a MySQL database (without fetching / buffering the result) | 4 |
Since PHP 4.3 it has been possible to specify additional flags for the mysql_connect() and mysql_pconnect() functions:
PHP: indicates the earliest version of PHP that supports the constant.
| Constant | Description | PHP |
|---|---|---|
| MYSQL_CLIENT_COMPRESS | Use compression protocol | 4.3 |
| MYSQL_CLIENT_IGNORE_SPACE | Allow space after function names | 4.3 |
| MYSQL_CLIENT_INTERACTIVE | Allow interactive timeout seconds of inactivity before closing the connection | 4.3 |
| MYSQL_CLIENT_SSL | Use SSL encryption (only available with version 4+ of the MySQL client library) | 4.3 |
The mysql_fetch_array() function uses a constant for the different types of result arrays. The following constants are defined:
| Constant | Description | PHP |
|---|---|---|
| MYSQL_ASSOC | Columns are returned into the array with the fieldname as the array index | |
| MYSQL_BOTH | Columns are returned into the array having both a numerical index and the fieldname as the array index | |
| MYSQL_NUM | Columns are returned into the array having a numerical index (index starts at 0) |
| $_SERVER 변수 (0) | 2009/04/19 |
|---|---|
| PHP mysql function 들 (0) | 2009/04/18 |
| PHP 파일업로드 구현시 보안문제 해결방안. (0) | 2009/04/17 |
| exlode() 배열 관리 외부파일 배열 생성하기 (1) | 2009/04/16 |
| PHP mysql function 들 (0) | 2009/04/18 |
|---|---|
| PHP 파일업로드 구현시 보안문제 해결방안. (0) | 2009/04/17 |
| exlode() 배열 관리 외부파일 배열 생성하기 (1) | 2009/04/16 |
| PHP 이메일 보내기 (0) | 2009/04/12 |
| PHP 파일업로드 구현시 보안문제 해결방안. (0) | 2009/04/17 |
|---|---|
| exlode() 배열 관리 외부파일 배열 생성하기 (1) | 2009/04/16 |
| PHP 이메일 보내기 (0) | 2009/04/12 |
| PHP mysql 로우 열 갯수 구하기 (0) | 2009/04/11 |
| exlode() 배열 관리 외부파일 배열 생성하기 (1) | 2009/04/16 |
|---|---|
| PHP 이메일 보내기 (0) | 2009/04/12 |
| PHP mysql 로우 열 갯수 구하기 (0) | 2009/04/11 |
| MYSQL ALTER 문 (0) | 2009/04/10 |
| PHP 이메일 보내기 (0) | 2009/04/12 |
|---|---|
| PHP mysql 로우 열 갯수 구하기 (0) | 2009/04/11 |
| MYSQL ALTER 문 (0) | 2009/04/10 |
| PHP 파일 업로드 (0) | 2009/04/10 |
| jQuery 를 이용한 XML 파싱 (0) | 2009/05/16 |
|---|---|
| INPUT TYPE 에서 숫자만 입력받기 (0) | 2009/04/10 |
| 테두리가 둥근 테이블 만들기 (0) | 2008/08/26 |
| 체크시 오늘 하루동안 새창 열지 않기 (0) | 2008/08/25 |
| PHP 이메일 보내기 (0) | 2009/04/12 |
|---|---|
| PHP mysql 로우 열 갯수 구하기 (0) | 2009/04/11 |
| MYSQL ALTER 문 (0) | 2009/04/10 |
| PHP 파일 업로드 (0) | 2009/04/10 |
| PHP 이메일 보내기 (0) | 2009/04/12 |
|---|---|
| PHP mysql 로우 열 갯수 구하기 (0) | 2009/04/11 |
| MYSQL ALTER 문 (0) | 2009/04/10 |
| PHP 파일 업로드 (0) | 2009/04/10 |
| CSS 리스트 가로 표시 (0) | 2009/04/19 |
|---|---|
| DIV 가운데 정렬 시키기 (3) | 2009/04/05 |
| 웹폰트 설치 방법 (0) | 2009/04/05 |
| 폼/전송버튼 스타일 설정 (1) | 2009/04/04 |
| DIV 가운데 정렬 시키기 (3) | 2009/04/05 |
|---|---|
| 웹폰트 설치 방법 (0) | 2009/04/05 |
| 폼/전송버튼 스타일 설정 (1) | 2009/04/04 |
| css 폰트 설정 정리자료 (1) | 2009/04/04 |
| 웹폰트 설치 방법 (0) | 2009/04/05 |
|---|---|
| 폼/전송버튼 스타일 설정 (1) | 2009/04/04 |
| css 폰트 설정 정리자료 (1) | 2009/04/04 |
| 웹디자인 포토샵강좌가 매일 업데이트 되는 사이트 (3) | 2008/09/07 |
| 폼/전송버튼 스타일 설정 (1) | 2009/04/04 |
|---|---|
| css 폰트 설정 정리자료 (1) | 2009/04/04 |
| 웹디자인 포토샵강좌가 매일 업데이트 되는 사이트 (3) | 2008/09/07 |
| 스크롤 따라다니는 메뉴 소스 (0) | 2008/09/05 |