mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-17 02:10:02 +09:00
첨부파일의 본문 삽입시 상대경로로 저장하게 하고 출력시 Rewrite mod에 영향을 받지 않게 절대경로로 변경함
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1961 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a522a2207e
commit
d9dc99c577
8 changed files with 12 additions and 9 deletions
|
|
@ -82,13 +82,10 @@
|
|||
* @brief 최종 결과물의 출력
|
||||
**/
|
||||
function display($content) {
|
||||
if(Context::getResponseMethod()=="XMLRPC") {
|
||||
print $content;
|
||||
return;
|
||||
}
|
||||
|
||||
$path = str_replace('index.php','',$_SERVER['SCRIPT_NAME']);
|
||||
|
||||
// files로 시작되는 src나 href의 값을 절대경로로 변경
|
||||
$content = preg_replace('!(href|src)=("|\'){0,1}files!is', '\\1=\\2'.$path.'files', $content);
|
||||
print preg_replace('!(href|src)=("|\'){0,1}\.\/([a-zA-Z0-9\_^\/]+)\/!is', '\\1=\\2'.$path.'$3/', $content);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue