Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error message when changing text on main page


freenews4me

Recommended Posts

Posted

Parse error: parse error in /home/u4/freenews4me/html/catalog/includes/languages/english/index.php on line 13

 

This is the error message I get when I change text on the main page. I have even tried just adding text within the default text and still get the same error. I've also tried changing it within each language file with no luck. Any suggestions? Thanks.

Posted

How are you editing the file?

 

Have you tried editing something simpler, like TITLE from english.php? What happens?

 

Thanks,

Matt

Posted

I'm using the admin panel going to Tools then Define Languages which brings me to a list of files and then I edit the index.php file from there. I've even tried going through the File Manager with the same result.

 

I just tried it again and I took out a word that I used an apostrophe in and it worked. Am I not allowed to use words with apostrophe's? Since I don't really know php and perl code I have no idea what symbols/punctuation I can and can not use.

 

Thanks for your help.

Heather

Posted
I just tried it again and I took out a word that I used an apostrophe in and it worked. Am I not allowed to use words with apostrophe's? Since I don't really know php and perl code I have no idea what symbols/punctuation I can and can not use.
If you look, you will see that the defines are done as follows:
define('CONSTANT', 'Text to use.');

Note that it uses ' to bracket the text. Thus, if you say something like

define('CONSTANT', 'This won't work right.');

It thinks that you are trying to say 'This won' and doesn't know what to do with the t work right.' that follows.

 

There are a couple ways to get it to say this, for example:

define('CONSTANT', 'This won' . "'" . 't work right.');

I haven't tested it in PHP, but in many languages using three ' together (''') works:

define('CONSTANT', 'This won'''t work right.');

Hth,

Matt

  • 4 weeks later...
Posted

I bet you have not tried

define('CONSTANT', 'I bet you have/'t tried this.');

 

 

I have not my self....

Archived

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

×
×
  • Create New...