in HTML — prevents ThinkPHP 3.1.3 lazy-regex parse errors. $webUrl = C('web_url'); $webName = C('web_name'); $defaultImage = $webUrl . '/xiaoyucms/images/logo.png'; $fallbackDesc = 'Professional supplier of pharmaceutical intermediates and fine chemicals.'; if (isset($product)) { $ogType = 'product'; $ogTitle = $product['name'] . ' - ' . $webName; $ogDescription = !empty($product['description']) ? mb_substr(strip_tags($product['description']), 0, 160, 'utf-8') : $fallbackDesc; $ogImage = !empty($photo[0]) ? $webUrl . '/Uploads/pro/' . $photo[0] : $defaultImage; $productUrl = !empty($product['url']) ? $product['url'] : ''; $ogUrl = $webUrl . '/' . $productUrl . '-p.html'; } elseif (isset($list)) { $ogType = 'website'; $ogTitle = $list['title'] . ' - ' . $webName; $ogDescription = mb_substr(strip_tags($list['description']), 0, 160, 'utf-8'); $ogImage = $defaultImage; $ogUrl = $webUrl . '/' . $list['url']; } elseif (isset($news)) { $ogType = 'article'; $ogTitle = $news['title'] . ' - ' . $webName; $ogDescription = mb_substr(strip_tags($news['description']), 0, 160, 'utf-8'); $ogImage = !empty($news['thumb']) ? $webUrl . '/' . $news['thumb'] : $defaultImage; $ogUrl = $webUrl . '/' . $news['url'] . '-n.html'; } else { $ogType = 'website'; $ogTitle = C('seo_title') . ' - ' . $webName; $ogDescription = C('seo_description'); $ogImage = $defaultImage; $ogUrl = $webUrl . '/'; } // Twitter duplicates OG values for simplicity $twitterTitle = $ogTitle; $twitterDescription = $ogDescription; $twitterImage = $ogImage; ?>
Name: Eric Yuan
Mobile:86-18427358861
Tel:86-18427358861
Whatsapp:+86 18427358861
Email:yihekeji@chembuying.com
Add: