본문 바로가기

[Linux] Shell 실행 후 결과 Shell 실행후 결과값을 보지 않기 위해.'>', '>>' 등을 사용하여 파일로 저장해줌.또는 > /tmp/null과 같이 해서 아예 없앨수 있음. svn Message나 htpasswd Message같은 경우 위와 같은 방법으로 캡쳐할수 없음.이럴때는 2>&1 을 사용해서 감춰줄 수 있음. 더보기
[PHP] 괄호 처리 괄호를 처리해줘야할 경우 생김.이경우 quotemeta() 함수를 이용해주면 \{\}형태로 변환해줌. 더보기
[Apache] CustomLog 사용법 config에서 CustomLog를 추가 하고 싶을때가 있음.예를 들어 Web DAV를 통해SVN으로 들어오는 메시지를 캡쳐해서 파라미터로 넘겨주고 싶을때가 있음. CustomLog "|/home/www/svnhookdispatcher.php" "%u\t%{SVN-ACTION}e\t%U\t%{SVN-STORAGE}e" env=SVN-ACTION이런식으로 바로 Virtual Host config에서 설정해 줄수 있음.하지만 이렇게 해줄 경우 parameter가 정상적으로 전달되지 않는 경우가 있을 수 있음.이럴 경우는 httpd.conf에서 log_config_module부분에서 LogFormat을 지정해주면됨. LogFormat "%u\t%{SVN-ACTION}e\t%U\t%{SVN-STORAGE}e" .. 더보기
[PHP] 특수문자 제거 정규표현식 Remove special characters in php $string = preg_replace("/[ #\&\+\-%@=\/\\\:;,\.'\"\^`~\_|\!\?\*$#()\[\]\{\}]/i", "", $string); 더보기
[PHP] Make xml 파일 makePomXml(); } private function makePomXml(){ $this->openURI($this->build_name.'.xml'); $this->setIndent(true); $this->startDocument("1.0", "UTF-8"); $this->startElement("project"); $this->writeAttribute("xmlns", "http://maven.apache.org/POM/4.0.0"); $this->writeAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); $this->writeAttribute("xsi:schemaLocation", "http://maven.apache... 더보기