0
如何添加型動物元(opengrapg)標籤的每一個動態生成的頁面(www.page.com/index.php?page=article & ID = 1),我試圖把這個文章頁:附加opengraph標籤
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta property="og:title" content="<?php echo $title?>" />
<meta property="og:type" content="article" />
<meta property="og:url" content="http://www.page.com/index.php?page=article&id=<?php echo $id ?>" />
<meta property="og:image" content="http://www.page.com/image.png" />
<meta property="og:site_name" content="eeeeee" />
<meta property="og:description" content="<?php echo $desc; ?>"/>
<meta property="fb:admins" content="blabla" />
</head>
但FB短絨不能看他們 - 「必選屬性丟失」
我簡單的包括帶開關功能article.php頁
$conlibrary="play/pages/" ;
IF(!isset($_GET['page'])){
$page = 'deafault';
} ELSE {
$page = $_GET['page'];
$findme = '&';
$pos = strpos($page, $findme);
IF ($pos ===true) {
$data = explode("&", $data);
$dest =$conlibrary."/".$data[0].".php";
IF (file_exists($dest)) {
$page = $_GET['page'];
} ELSE {
$page = '404';
}
} ELSE {
$dest =$conlibrary."/".$page.".php";
IF (file_exists($dest)) {
$page = $_GET['page'];
} ELSE {
$page = '404';
}
}
}
include($conlibrary . $page .".php");
TY
對不起,我編輯的職位,其acctualy這樣....但在這種情況下,我不得不改變開關(導航)功能,其作品只有沒有「?」 ? – InTry 2011-05-31 08:25:45