| | |
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 |
ajax apache api array arrays beginner binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date display dynamic echo email error external file files folder form forms forum function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert integration ip java javascript joomla limit link login loop mail malfunction menu method mlm multiple mysql neutrality oop paypal pdf php phpmysql play problem query question radio random recursion regex remote root script search select server sessions sms soap source space sql syntax system table tutorial update upload url validator variable video web xml youtube





