我HABE用PHP 5.3和Joomla和错误显示这样 的preg_replace(一个问题)[ 'W' 在/ var/WWW/的preg_replace()[function.preg替换]:未知的修饰 'W' 中/var/www/.../public_html/
我的代码
$params = $this->item->params;
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$canEdit = $this->item->params->get('access-edit');
$user = JFactory::getUser();
$imagesJson = json_decode($this->item->images);
$images_stringPath = substr($imagesJson->image_fulltext, 0,strripos($imagesJson->image_fulltext, '/'));
$path = "/".$images_stringPath;
$tmp_filename=preg_replace($_SERVER["DOCUMENT_ROOT"].$path.'/','',$value);
为什么不使用'str_replace'? – Gumbo 2013-05-05 07:07:09