본문 바로가기

php 디렉토리 목록 출력 제거 Apache/2.4.10 (Ubuntu) 기준 /etc/apache2/apache2.conf before Options indexes FollowSymLinks AllowOverride None Require all granted after Options FollowSymLinks AllowOverride None Require all granted indexes 제거
core/Common.php error 해결 방법 codeigniter 초기 오류 해결 A PHP Error was encounteredSevrity : NoticeMssage : Only variable references should be returned by referenceFilename : core/Common.phpLine Number : 257 :257 before return $_config[0] = & $config; after $_config[0] = & $config;return $_config[0]; 출처 : 클릭
codeigniter 설치 방법 (ubuntu) 미리 php, apache 를 설치 해놓으셔야 됩니다. $ cd /var/www 버전은 골라서 받으시면 됩니다. 코드이그나이터 버전 $ sudo wget http://ellislab.com/asset/ci_download_files/reactor/CodeIgniter_2.1.2.zip $ sudo unzip CodeIgniter_2.1.2.zip 기본으로 쓰고 싶다면 $ sudo mv /var/www/html /var/www/html2$ sudo mv /var/www/CodeIgniter_2.1.2 /var/www/html 경로 자체를 바꾸고 싶다면 /etc/apache2 설정 파일을 고치시면 됩니다.
ubuntu 부트로더 설정 윈도우7 설치 -> 리눅스 (ubuntu) 설치 1. 리눅스로만 잡혀있을 경우 $ sudo update-grub 재부팅 2. 따로 잡아야 될 경우 $ sudo fdisk -l // 파티션 확인 $ sudo vi /etc/grub.d/40_custom menuentry "Windows 7" { insmod ntfs set root='(hd0,4)' chainloader +1 } 해당 파티션에 맞게 빨간 부분을 수정해서 추가해주시면 됩니다. $ sudo update-grub
mysql : 5.6 이상 character utf-8 로 설정 ubuntu 기준 /etc/mysql/my.cnf [client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] collation-server = utf8_unicode_ci init-connect='SET NAMES utf8' character-set-server = utf8/etc/mysql - 확인 $ mysql -u [userid] -p$ [passwod]mysql> show variables like 'char%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+-..
vi 치환 명령어 :범위s/pattern/replace/ 범위 중에서 각 줄 중 처음 발견된 pattern을 replace로 치환 :범위s/pattern/replace/g 범위 중에서 발견되는 모든 pattern을 replace로 치환 범위는 행번호를 쓰면 됨. 핸재 행은 '.', 처음 행은 '^', 마지막 행은 '$', 전체 범위는 '%'로 표시하면 된다. 행뿐만 아니라 줄의 처음도 '^', 마지막도 '$'로 사용하면 된다. escape 문자는 '\'로 사용한다. 1. 문서 전체 범위에서 'test'를 'test2'로 바꾸기 :%s/test/test2/g 2. 3번째 줄에서 10번째 줄까지 'test'를 'test2'로 바꾸기 :3,10s/test/test2/g 3. 현재 줄 -2번째 줄에서 +3번째 줄까지 'test'..
각종 마약이 주는 느낌
final final 클래스 - 상속받을 수 없음을 지정 final class FinalClass { ..... } class DerivedClass extends FinalClass { // 컴파일 오류 발생 ..... } final 메소드 - 오버라이딩할 수 없음을 지정 public class SuperClass { pretected final int finalMethod() { ... } } class DerivedClass extends SuperClass { // DerivedClass가 SuperClass를 상속 받음 protected int finalMethod() { ... } // 컴파일 오류, 오버라이딩 할 수 없음 } final 필드, 상수 정의 - 상수를 정의할 때 사용