 |
 |
 |
 |
 |
| Author |
Message |
stamper
Joined: 11 Jun 2008 Posts: 3
|
|
Full news path |
|
Hi All...
I was hoping someone could confirm that this is the correct manner in which to inlclude the news:
 |  | <?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 |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
robp07
Joined: 15 Jun 2008 Posts: 21
|
|
|
|
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 |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
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:
 |  | <?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
last update: 07-22-08: 8:30 pm |
|
| Mon Jul 14, 2008 2:49 pm |
|
 |
|
|
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
|
|
 |
 |
 |
|