PDA

View Full Version : define('TEXT_MAIN'


CoasterPunk
5-30-04, 04:43 AM
Ok in this file "/includes/languages/english/index.php"

I want to be able to use php in this line

define('TEXT_MAIN', ' This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional......'</b></font>.');

I have tested it out and it don't work. Is there a way I can make it display php scripts? I am trying to put this php code in that line.

<? include("http://www.rollercoasterpunk.com/test.html"); ?>

I am trying to come up with an easyer way to edit the text on my main page so I don't have to go into "/includes/languages/english/index.php" and find the line with the text I want to edit by having the text in a sepret file

stevel
5-30-04, 07:04 AM
This define is used as the argument to an echo function. So you would do something like this:

define('TEXT_MAIN', 'include("test.html")')

I don't recommend you use an "external URL" in this.

CoasterPunk
5-30-04, 12:34 PM
define('TEXT_MAIN', 'include("test.html")');

gives me this :confused:

include("test.html")

CoasterPunk
5-30-04, 06:23 PM
Ok I got it to work
instead of define('TEXT_MAIN', 'include("test.html")');
I put define('TEXT_MAIN', include("test.html"));

but the text apears above my header and this is what I get below the header

Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?

1

I don't know where that 1 is coming from.
Please help

Jade Dragon
6-1-04, 04:21 PM
I opened up index.php and searched for TEXT_MAIN and inserted a new table row underneath it with the include statement.

If you plan to include a script make sure that script is secure so you don't accidentally leave an open door to your site.

If it is html then just link to the page you want to insert.

=)
Jade