mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
rewrite mod사용시 이모티콘등의 이미지등의 경로가 어긋나는 문제를 정규표현식을 수정하여 해결
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2549 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
bfb5b3d942
commit
61729c1352
1 changed files with 3 additions and 3 deletions
|
|
@ -93,9 +93,9 @@
|
|||
|
||||
$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);
|
||||
$content = preg_replace('!(href|src)=("|\'){0,1}\.\/([a-zA-Z0-9\_^\/]+)\/!is', '\\1=\\2'.$path.'$3/', $content);
|
||||
// commons/modules/files/widgets/layouts/addons 로 시작되는 src나 href의 값을 절대경로로 변경
|
||||
$content = preg_replace('!(href|src)=("|\'){0,1}(commons|modules|widgets|layouts|addons|files)!is', '\\1=\\2'.$path.'\\3', $content);
|
||||
$content = preg_replace('!(href|src)=("|\'){0,1}\.\/([a-zA-Z0-9\_^\/]+)\/!is', '\\1=\\2'.$path.'\\3/', $content);
|
||||
|
||||
if($this->gz_enabled) print ob_gzhandler($content, 5);
|
||||
else print $content;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue