こんにちは、立ち上げたサイトがありますが、ニュース記事が表示されません。URL 変数を使用して、どの記事を動的な PHP ページにロードするかを決定しています。
私のサイトは www.coverforce.com.au で、問題のリンクは右下隅のインデックス ページに表示されるニュース記事用です。
私のクエリコードは次のとおりです。
$totalRows_variablearticles = "-1";
if (isset($_GET['id'])) {
$totalRows_variablearticles = $_GET['id'];
}
mysql_select_db($database_newsDBconnection, $newsDBconnection);
$query_variablearticles = sprintf("SELECT * FROM NewsArticles, NewsArticleCategories, NewsArticlePhotos, NewsPhotos, NewsCategories WHERE NewsArticles.id = %s AND NewsArticles.id = NewsArticleCategories.newsArticleID AND NewsArticles.id = NewsArticlePhotos.newsArticleID AND NewsArticlePhotos.newsPhotoID = NewsPhotos.id AND NewsArticleCategories.newsCategoryID = NewsCategories.id", GetSQLValueString($totalRows_variablearticles, "int"));
$variablearticles = mysql_query($query_variablearticles, $newsDBconnection) or die(mysql_error());
$row_variablearticles = mysql_fetch_assoc($variablearticles);
$totalRows_variablearticles = mysql_num_rows($variablearticles);
私のhtaccessコードは
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^/?test\.html$ test.php [L]
RewriteRule ^/?index\.html$ index.php [L]
RewriteRule insurance-news/news/(.*)/(.*)/$ insurance-news/news.php?$1=$2
rewritecond %{http_host} ^coverforce.com.au [nc]
rewriterule ^(.*)$ http://www.coverforce.com.au/$1 [r=301,nc]
これは、コンテンツをページにロードするために使用しているコードです
<h1><?php echo $row_variablearticles['headline']; ?></h1>
<p>Posted:<?php echo $row_variablearticles['publishDate']=substr($row_variablearticles['publishDate'],0,-8); ?></p>
<p><br />
<?php echo $row_variablearticles['text']; ?></p>
あなたが提供できるどんな助けも素晴らしいでしょう-私がすぐに直さないと、私の上司は私の頭を切り落とすつもりです笑