package first;

public class hello {

	public static void main(String[] args) {
		System.out.println("test java");
	}
    
}

'java, jsp, spring, egov' 카테고리의 다른 글

jsp 파일 다운로드  (0) 2016.02.04
모바일 접속 구별  (0) 2015.03.31
mod 함수를 이용한 나누기  (0) 2015.01.17
프롬프트(scan) 입력받기  (0) 2015.01.10
page utf-8 디렉티브  (0) 2014.09.27
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,
function inc_stringcutU($str, $limit)
	/* Note: */
	/* $str must be a valid UTF-8 string */
	/* it may return an empty string even if $limit > 0 */
{
	$len= strlen($str);

	if ($len<= $limit )
		return $str;

	$len= $limit;

	/* ASCII are encoded in the range 0x00 to 0x7F
	* The first byte of multibyte sequence is in the range 0xC0 to 0xFD.
	* All furthur bytes are in the range 0x80 to 0xBF.
	*/

	while ($len > 0 && ($ch = ord($str[$len])) >= 128 && ($ch < 192))
		$len --;
	
    $word = substr($str, 0, $len).".."; 
	return $word;
}

'php, codeigniter' 카테고리의 다른 글

워터마크(watermark) 찍기  (0) 2015.01.12
png 이미지 글자 쓰기  (0) 2015.01.11
코드이그나이터 : IIS에서 index.php 지우기  (0) 2014.12.26
요일 구하기  (0) 2014.12.24
mysql 인젝션(injection) 방어  (0) 2014.12.10
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,
RewriteEngine On
RewriteCond $1 !^(index\.php|images|captcha|data|include|uploads|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
출처 : http://www.jkun.net/300

 

'php, codeigniter' 카테고리의 다른 글

png 이미지 글자 쓰기  (0) 2015.01.11
utf-8 글자 자르기  (0) 2015.01.02
요일 구하기  (0) 2014.12.24
mysql 인젝션(injection) 방어  (0) 2014.12.10
코드이그나이터 : 여러개의 필드 like  (0) 2014.12.04
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,

요일 구하기

php, codeigniter 2014. 12. 24. 15:47
<?
$week = array("일요일","월요일","화요일","수요일","목요일","금요일","토요일");
$date = date("Y-m-d");
echo $week[date('w',strtotime($date))];
?>
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,
<?php
// Quote variable to make safe
function quote_smart($value)
{
	// Stripslashes
	if (get_magic_quotes_gpc()) {
		$value = stripslashes($value);
	}
	// Quote if not integer
	if (!is_numeric($value)) {
		$value = "'" . mysql_real_escape_string($value) . "'";
	}
	return $value;
}

// Connect
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
	OR die(mysql_error());

// Make a safe query
$query = sprintf("SELECT * FROM users WHERE user=%s AND password=%s",
	quote_smart($_POST['username']),
	quote_smart($_POST['password']));

mysql_query($query);
?>
출처 : http://hoooow.tistory.com/m/post/151
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,