PHP Include will not work in Full Story ...

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

PHP Include will not work in Full Story ...

Postby Hrvoje » Tue May 01, 2007 12:02 am

Ok, my link goes like this: www.itehno.com/index.php and when i click for example on one article http://www.itehno.com/cgi-bin/vijesti/v ... EZlNUZKZBs

inside style for the full story i put <?php include("../../livi-meni.php"); ?>

and ofcourse it wont work cause php do not support ../../

basically, what i want, in the full story is to read http://www.itehno.com/livi-meni.php ... SSI is also not working because my pages are in .php extension. please help! Thank you!
Hrvoje
 
Posts: 182
Joined: Thu Mar 22, 2007 12:35 pm

Postby Jackanape » Tue May 01, 2007 2:28 am

Is it just me, or did you get it working?

Looks like the story is there...
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-Robert A. Heinlein
User avatar
Jackanape
 
Posts: 632
Joined: Tue Jan 09, 2007 12:15 am
Location: Capitol of the Great State of New York

Postby Hrvoje » Tue May 01, 2007 2:52 am

Jackanape wrote:Is it just me, or did you get it working?

Looks like the story is there...
no i didnt get it working i cant attach headlines.txt file cause in php ../../ is not working!
Hrvoje
 
Posts: 182
Joined: Thu Mar 22, 2007 12:35 pm

Re: PHP Include will not work in Full Story ...

Postby SrNupsen » Tue May 01, 2007 9:38 am

Hrvoje wrote:Ok, my link goes like this: www.itehno.com/index.php and when i click for example on one article http://www.itehno.com/cgi-bin/vijesti/v ... EZlNUZKZBs

inside style for the full story i put <?php include("../../livi-meni.php"); ?>

and ofcourse it wont work cause php do not support ../../

basically, what i want, in the full story is to read http://www.itehno.com/livi-meni.php ... SSI is also not working because my pages are in .php extension. please help! Thank you!


Did you try

Code: Select all
<?php include("http://www.itehno.com/livi-meni.php"); ?>


instead?
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Re: PHP Include will not work in Full Story ...

Postby Hrvoje » Tue May 01, 2007 10:04 pm

SrNupsen wrote:
Hrvoje wrote:Ok, my link goes like this: www.itehno.com/index.php and when i click for example on one article http://www.itehno.com/cgi-bin/vijesti/v ... EZlNUZKZBs

inside style for the full story i put <?php include("../../livi-meni.php"); ?>

and ofcourse it wont work cause php do not support ../../

basically, what i want, in the full story is to read http://www.itehno.com/livi-meni.php ... SSI is also not working because my pages are in .php extension. please help! Thank you!


Did you try

Code: Select all
<?php include("http://www.itehno.com/livi-meni.php"); ?>


instead?
yes


not working
Hrvoje
 
Posts: 182
Joined: Thu Mar 22, 2007 12:35 pm

Postby SrNupsen » Tue May 01, 2007 10:12 pm

Sorry, just read your post properly...

viewnews.cgi (which you are using to display your news) is a CGI script. You can't have PHP includes in a CGI script (it doesn't have a .php extension), and hence PHP code will not be parsed. So sorry, no can do.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Hrvoje » Wed May 02, 2007 12:41 am

SrNupsen wrote:Sorry, just read your post properly...

viewnews.cgi (which you are using to display your news) is a CGI script. You can't have PHP includes in a CGI script (it doesn't have a .php extension), and hence PHP code will not be parsed. So sorry, no can do.
so how can i attach headlines.txt then? i want for example headlines.txt on my full story, how do i do that?
Hrvoje
 
Posts: 182
Joined: Thu Mar 22, 2007 12:35 pm

Postby Hrvoje » Wed May 02, 2007 12:59 am

ssi wil not work cause i dont use shtm but php files... is there any other way to include Headlines.txt ? Except php and ssi?
Hrvoje
 
Posts: 182
Joined: Thu Mar 22, 2007 12:35 pm

Postby Jackanape » Wed May 02, 2007 3:10 am

Code: Select all
<?php include("http://www.itehno.com/news/headlines.txt"); ?>


I see you incuding a php file above. If you just want to include headlines.txt, then this should do it.
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-Robert A. Heinlein
User avatar
Jackanape
 
Posts: 632
Joined: Tue Jan 09, 2007 12:15 am
Location: Capitol of the Great State of New York

Postby SrNupsen » Wed May 02, 2007 6:26 am

http://www.itehno.com/cgi-bin/vijesti/viewnews.cgi?id=EEZZAFZFEZl NUZKZBs


This is NOT a PHP page.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Musicvid » Wed May 02, 2007 2:02 pm

I haven't tested his links, but perhaps part of the problem is in his .htaccess file. Here is how to add includes to html pages:
Code: Select all
AddHandler server-parsed .shtml .html
Last edited by Musicvid on Wed May 02, 2007 2:53 pm, edited 1 time in total.
Musicvid
 
Posts: 138
Joined: Wed Jan 17, 2007 1:05 am
Location: Western America

Postby Hrvoje » Wed May 02, 2007 2:28 pm

whatever site it is how can i include my headlines ?
Hrvoje
 
Posts: 182
Joined: Thu Mar 22, 2007 12:35 pm

Postby Hrvoje » Wed May 02, 2007 2:41 pm

what's PERL code to include headlines.txt?
Hrvoje
 
Posts: 182
Joined: Thu Mar 22, 2007 12:35 pm

Postby Jackanape » Wed May 02, 2007 6:55 pm

SrNupsen wrote:
http://www.itehno.com/cgi-bin/vijesti/viewnews.cgi?id=EEZZAFZFEZl NUZKZBs


This is NOT a PHP page.


No, but this is:

http://www.itehno.com/livi-meni.php

According to his include code above:
inside style for the full story i put <?php include("../../livi-meni.php"); ?>


Maybe I'm the one confused here, but it seems everyone is talking about different things here.

Hrvoje, if you want your headlines to point directly to the entire news item, you can try maginot, as that is one of its most basic functions. Even so, if you want to include your headlines.txt, include them, NOT the php file you reference above. If I'm completely misunderstanding you, I suspect we all might be, please elucidate your problem for us in a little more detail.
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-Robert A. Heinlein
User avatar
Jackanape
 
Posts: 632
Joined: Tue Jan 09, 2007 12:15 am
Location: Capitol of the Great State of New York

Postby Hrvoje » Wed May 02, 2007 8:05 pm

Jackanape wrote:
SrNupsen wrote:
http://www.itehno.com/cgi-bin/vijesti/viewnews.cgi?id=EEZZAFZFEZl NUZKZBs


This is NOT a PHP page.


No, but this is:

http://www.itehno.com/livi-meni.php

According to his include code above:
inside style for the full story i put <?php include("../../livi-meni.php"); ?>


Maybe I'm the one confused here, but it seems everyone is talking about different things here.

Hrvoje, if you want your headlines to point directly to the entire news item, you can try maginot, as that is one of its most basic functions. Even so, if you want to include your headlines.txt, include them, NOT the php file you reference above. If I'm completely misunderstanding you, I suspect we all might be, please elucidate your problem for us in a little more detail.


Ok, inside
Default Style
This style is currently used by profile news.
[Edit]

i put the whole copy paste of my website from dreamweaver cs3.

i want to add headlines.txt thats all!<?php include("Headlines.txt"); ?> will not work!
Hrvoje
 
Posts: 182
Joined: Thu Mar 22, 2007 12:35 pm

Next

Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron