Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Full news path

 
Reply to topic    Forum Index » Help View previous topic
View next topic
Full news path
Author Message
stamper



Joined: 11 Jun 2008
Posts: 3

Post Full news path Reply with quote
Hi All...

I was hoping someone could confirm that this is the correct manner in which to inlclude the news:

Code:
<?PHP
$number=5;
$category="1,2";
include 'C:/htdocs/www.mysite.com/docs/mdata/news/show_news.php';
?>


As it is now, when I go to view the news, it just has an error message saying:

Post not found

Even though there are news posts (and the categories are correct etc). I should also add, that I can view the show_news.php file in a browser and see all the news. The problem is when I try and insert it on to another page, which is what makes me think I have the full path incorrect somehow.

It is obviously running on a Windows IIS - So I am not sure if that could be causing issues.

ANy suggestions?

Thanks
Mon Jul 14, 2008 11:28 am View user's profile Send private message
Guest








Please login to hide the ads.

robp07



Joined: 15 Jun 2008
Posts: 21

Post Reply with quote
Never used a windows server. Have you tried removing the C:/ ?

Also, do you have any other scripts on your site which may interfere with the news?
Mon Jul 14, 2008 2:25 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
If it says 'post not found' I mean you're doing something right although typically no that isn't correct. You must be hosting cutenews.ru from the same computer you're working on.. Try this include code instead:

Code:
<?php
$number = "5";
$category = "1, 2";
include ("news/show_news.php");
?>


I noticed you used quotes in one place and not in the other. I recommend either using quotes always, using apostraphes always, or using none at all.. in other words consistency. It's just good habit and practice.

p.s. you do have some news saved in cnr right?

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Mon Jul 14, 2008 2:49 pm View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.