Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing Page Text


Guest

Recommended Posts

Posted

I've tried many times to change the content of my page, placing my text in define('TEXT_MAIN', '______________. Naturally, the file I'm working with is .../catalog//includes/languages/english. I then save the code and refresh webpage. According to the instructions (as I understand them) the text that I put in should be reflected on the page. However, I instead get this error:

 

Parse error: parse error, unexpected T_STRING in /home/neccessa/public_html/osCommerce1/catalog/includes/languages/english/index.php on line 20

 

I have not altered the code in any other way. Would someone be able to tell me what I'm doing wrong and how to get the desired text in the website? Thanks.

Posted

The most common problem arises when using apostrophes in the test

 

For example:

define('TEXT_MAIN', 'It's shopping time');

wouldn't work because the extra ' confuses PHP

 

You need to 'escape' the apostrophe like this:

define('TEXT_MAIN', 'It\'s shopping time');

 

 

Tom

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...