| | |
Need Help With Parse Error...
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2005
Posts: 1
Reputation:
Solved Threads: 0
ok, i'm really new to php, and i was trying to edit some text, and after i changed it i musta screwed something up because now i get a parse error unexpected t_string line 23, here is the code...
<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers |
// | |
// | http://www.zen-cart.com/index.php |
// | |
// | Portions Copyright (c) 2003 osCommerce |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.zen-cart.com/license/2_0.txt. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | license@zen-cart.com so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// $Id: index.php 290 2004-09-15 19:48:26Z wilt $
//
define('TEXT_MAIN', 'To celebrate National Scrapbooking Day, May 7th, Yesterday-Remembered is having our first ever contest! Use any of our kits, excluding freebies, to make a layout and post it at your favorite gallery. The first five people to email mirranda@yesterday-remembered.com with a link to the layout will recieve a gift certificate for a free kit. All participants will recieve a special bonus. To make the deal even sweeter, all kits will be 20% off through Sunday May 8!!! Good luck, we can't wait to see what you create. </strong>');
// Showcase vs Store
if (STORE_STATUS == '0') {
define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s">log yourself in</a>?');
} else {
define('TEXT_GREETING_GUEST', 'Welcome, please enjoy our online showcase.');
}
Please help me... i need to get my page back up...
Thanx
<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers |
// | |
// | http://www.zen-cart.com/index.php |
// | |
// | Portions Copyright (c) 2003 osCommerce |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.zen-cart.com/license/2_0.txt. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | license@zen-cart.com so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// $Id: index.php 290 2004-09-15 19:48:26Z wilt $
//
define('TEXT_MAIN', 'To celebrate National Scrapbooking Day, May 7th, Yesterday-Remembered is having our first ever contest! Use any of our kits, excluding freebies, to make a layout and post it at your favorite gallery. The first five people to email mirranda@yesterday-remembered.com with a link to the layout will recieve a gift certificate for a free kit. All participants will recieve a special bonus. To make the deal even sweeter, all kits will be 20% off through Sunday May 8!!! Good luck, we can't wait to see what you create. </strong>');
// Showcase vs Store
if (STORE_STATUS == '0') {
define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s">log yourself in</a>?');
} else {
define('TEXT_GREETING_GUEST', 'Welcome, please enjoy our online showcase.');
}
Please help me... i need to get my page back up...
Thanx
•
•
Join Date: May 2005
Posts: 2
Reputation:
Solved Threads: 0
define('TEXT_MAIN', 'To celebrate National Scrapbooking Day, May 7th, Yesterday-Remembered is having our first ever contest! Use any of our kits, excluding freebies, to make a layout and post it at your favorite gallery. The first five people to email mirranda@yesterday-remembered.com with a link to the layout will recieve a gift certificate for a free kit. All participants will recieve a special bonus. To make the deal even sweeter, all kits will be 20% off through Sunday May 8!!! Good luck, we can't wait to see what you create. </strong>');
You need to replace the ' above with \'.
Why? Well, this is because you are typing a string in PHP, using single quotes to tell PHP where the string starts and ends. The problem is... PHP sees your string above seems to end early, just after can , and then sees a lot of random characters afterwards that it doesn't understand.
By adding a \ in front of the ' in the string, you are telling PHP that the ' doesn't end the string. So it continues reading on until the end.
Hope that helps!
Peter
You need to replace the ' above with \'.
Why? Well, this is because you are typing a string in PHP, using single quotes to tell PHP where the string starts and ends. The problem is... PHP sees your string above seems to end early, just after can , and then sees a lot of random characters afterwards that it doesn't understand.
By adding a \ in front of the ' in the string, you are telling PHP that the ' doesn't end the string. So it continues reading on until the end.
Hope that helps!
Peter
![]() |
Similar Threads
- Help. Parse error in PHP code (PHP)
- PHP Parse error: parse error, unexpected T_STRING (PHP)
- Parse error: parse error, unexpected T_STRING in /home/thei2k9/public_html/includes/f (PHP)
- Parse Error message when testing page on browser - HELP!! (PHP)
- Parse error: (PHP)
- I need help with a parse error! (PHP)
- Parse error, syntax error, Forbids declaration (C++)
Other Threads in the PHP Forum
- Previous Thread: Search two tables
- Next Thread: Purchase order system
| Thread Tools | Search this Thread |
advanced alerts apache api archive array autosuggest beginner binary broken cakephp checkbox class clients cms code cron curl database date datepart display dynamic echo email emptydisplayvalue eregi error execute explodefunction file files folder form forms function functions google hack head href htaccess html if...loop image include insert ip javasciptvalidation javascript joomla keywords library limit link login mail matching menu mlm multiple mysql number object oop password paypal pdf php phpincludeissue query radio random recursive remote script search searchbox server sessions shot smarty source space speed sql syntax system table tutorial update upload url validator variable vbulletin video web website youtube





