Does anyone know if you can use Windows Notepad for a PHP editor?
I have tried, but get strange results. I am at T-O-T-A-L beginner so I am not sure what to expect.
I know I tried to google this question and got nothing. This board has taken me through Access and I think it would be a great idea to have a similar area here for MySQL/PHP as they are very popular.
Thanks
rob1234
06-06-2006, 10:22 AM
It should work. I use notepad for all my web based programming (mostly asp and html). I've heard wordpad can screw things up though.
You might want to check that the file is saving as xxxx.php and not xxxx.php.txt (I think php files are .php right?). Windows might hide the .txt part if you haven't changed the option to show known file type extensions.
Yeah, the extenson thing and it's ok.
For the most part it seems fine, but as an example if I download someone else script (in notepad) I might see the HTML part (<html><body>...but the actual script part might be unknown characters (ASCII stuff maybe like little rectangles).
kobogear
06-09-2006, 04:18 AM
Yeah, the extenson thing and it's ok.
For the most part it seems fine, but as an example if I download someone else script (in notepad) I might see the HTML part (<html><body>...but the actual script part might be unknown characters (ASCII stuff maybe like little rectangles).
Hello
i'm running a oscommerce shop and tried to update the index page.
I've uploaded the update and now get
Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/kobogearuk/public_html/catalog/index.php on line 19
Here is the code but i don't know what i need to do to correct it.
<?php
/*
$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
define('TEXT_MAIN', 'kobogear.co.uk is a supplier of 100% quality refurbished mobile phone handsets including brand names such as Motorola, Nokia, Samsung and Sony Ericsson. <b>Use our fast shipment and friendly reliable service to purchase your new cellular phone.</b><table border="0" width="100%" cellspacing="5" cellpadding="2"><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES. 'default/1.gif'). '</td><td class="main" valign="top">All our cell phone are sim free and unlocked so you can put them into any cell phone except 3 mobile network.<br><br></td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif'). '</td><td class="main" valign="top">So whether you own a contract sim card or a pay as you go sim card you can use kobogear.co.uk to upgrade your cell phone.<br><br></td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/3.gif'). '</td><td class="main" valign="top">I hope you enjoy kobogear.co.uk and our online shopping area and we look forward to doing business with you. We are always looking to expand our cell phone product range and feel that the key to our success will be to offer great mobile phone products and a second to none service.</td></table></a></font>.');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');
if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', 'Let\'s See What We Have Here');
define('TABLE_HEADING_IMAGE', '');
define('TABLE_HEADING_MODEL', 'Model');
define('TABLE_HEADING_PRODUCTS', 'Product Name');
define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
define('TABLE_HEADING_QUANTITY', 'Quantity');
define('TABLE_HEADING_PRICE', 'Price');
define('TABLE_HEADING_WEIGHT', 'Weight');
define('TABLE_HEADING_BUY_NOW', 'Buy Now');
define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
define('TEXT_SHOW', '<b>Show:</b>');
define('TEXT_BUY', 'Buy 1 \'');
define('TEXT_NOW', '\' now');
define('TEXT_ALL_CATEGORIES', 'All Categories');
define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
define('HEADING_TITLE', 'Quality refurbished mobiles');
} elseif ($category_depth == 'nested') {
define('HEADING_TITLE', 'Categories');
}
?>
I appreciate your help
Best Regards
Kieran
brucesilvers
07-06-2006, 12:42 PM
I like the "TextPad" program - you can get a free demo, it is quite simple, it displays line numbers to help with debugging.
cymrudesign
07-12-2006, 09:58 AM
kobogear what have you updated on the index php? i make line 19 as
if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
dedwards1960
07-17-2006, 07:49 AM
You can find some great php editors that are free on the internet.
Here is a link to the one I use.
http://www.mpsoftware.dk/phpdesigner.php
Thanks for the tips, I'll chech them out!
dt01pqt
07-26-2006, 09:31 AM
Notepad is fine. When a file is uploaded via http you can specify whether it is done in binary file format (best for images, etc) or text. Some idjuts use the wrong one:rolleyes: :p . So that is why the characters are not appearing properly.
mercy
08-03-2006, 08:25 PM
Yes, even i feel textpad or notepad is good choie and when save it, youcan chnage the file type.
When a file is uploaded via http you can specify whether it is done in binary file format (best for images, etc) or text. Some idjuts use the wrong one
Oh...pretty funny because the files that are getting screwed up are from a book I am going through and they have a website support area for the tutorials (can't remember the name of the book, but it was highly recommeded).
Is there any way to set them right?
dt01pqt
08-24-2006, 07:30 AM
When a file is uploaded via http you can specify whether it is done in binary file format (best for images, etc) or text. Some idjuts use the wrong one
Oh...pretty funny because the files that are getting screwed up are from a book I am going through and they have a website support area for the tutorials (can't remember the name of the book, but it was highly recommeded).
Is there any way to set them right?
Do you have an example of the code?
Not with me, I'll get it when I go home.
Thank you