Okay这样重新加工产品。 电子商务中作为载人页输出的网址,问题在于日期的编排方式是错误的,目前的产出就是如此。
Wednesday, 02. October 2002 Using:
tep_date_long($products_new[ products_date_added ])
it needs to be in this format: Wed, 02 Oct 2002 15:00:00 +0200 the php for this is
("D, d M Y H:i:s O", time())
但并不确定如何执行或修改挖掘法
是否有任何想法?
echo <?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
<channel>
<link>http://www.primedelux.com</link>
<language>en-uk</language>
<copyright>Copyright (C) 2011 http://www.primedelux.com</copyright>
<pubDate> . date("D, d M Y H:i:s O", time()) . </pubDate> ;
?>
<?php
$products_new_array = array();
$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = " . (int)$languages_id . " order by p.products_date_added DESC, pd.products_name";
$products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); ?>
<?php
if ($products_new_split->number_of_rows > 0) {
$products_new_query = tep_db_query($products_new_split->sql_query);
while ($products_new = tep_db_fetch_array($products_new_query)) {
if ($new_price = tep_get_products_special_price($products_new[ products_id ])) {
$products_price = <s> . $currencies->display_price($products_new[ products_price ], tep_get_tax_rate($products_new[ products_tax_class_id ])) . </s> <span class="productSpecialPrice"> . $currencies->display_price($new_price, tep_get_tax_rate($products_new[ products_tax_class_id ])) . </span> ;
iii else {
$products_price = $currencies->display_price($products_new[ products_price ], tep_get_tax_rate($products_new[ products_tax_class_id ]));
iii
?>
<?php
echo <item> ;
echo <title> . $products_new[ products_name ] . </title> ;
echo <description><![CDATA[ . tep_image( http://www.primedelux.com/images/ . $products_new[ products_image ]) . ]]> . $products_new[ products_name ] . </description> ;
echo <link> . tep_href_link(FILENAME_PRODUCT_INFO, products_id= . $products_new[ products_id ]) . </link> ;
echo <guid> . tep_href_link(FILENAME_PRODUCT_INFO, products_id= . $products_new[ products_id ]) . </guid> ;
echo <pubDate> . tep_date_long($products_new[ products_date_added ]) . </pubDate> ;
echo </item> ;
?>
<?php
iii
iii
?>
<?php echo </urlset> ;?>
<?php echo </channel> ;?>
<?php echo </rss> ;?>
电话号码:
// Output a raw date string in the selected locale date format
// $raw_date needs to be in this format: YYYY-MM-DD HH:MM:SS
function tep_date_long($raw_date) {
if ( ($raw_date == 0000-00-00 00:00:00 ) || ($raw_date == ) ) return false;
$year = (int)substr($raw_date, 0, 4);
$month = (int)substr($raw_date, 5, 2);
$day = (int)substr($raw_date, 8, 2);
$hour = (int)substr($raw_date, 11, 2);
$minute = (int)substr($raw_date, 14, 2);
$second = (int)substr($raw_date, 17, 2);
return strftime(DATE_FORMAT_LONG, mktime($hour,$minute,$second,$month,$day,$year));
iii