PHP Editor (1 Viewer)

DanG

Registered User.
Local time
Today, 02:20
Joined
Nov 4, 2004
Messages
477
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

Registered User.
Local time
Today, 02:20
Joined
Aug 16, 2005
Messages
25
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.
 

DanG

Registered User.
Local time
Today, 02:20
Joined
Nov 4, 2004
Messages
477
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).
 
K

kobogear

Guest
please help me???

DanG said:
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

Registered User.
Local time
Today, 02:20
Joined
Aug 4, 2000
Messages
70
I like the "TextPad" program - you can get a free demo, it is quite simple, it displays line numbers to help with debugging.
 

cymrudesign

Registered User.
Local time
Today, 02:20
Joined
May 7, 2006
Messages
84
kobogear what have you updated on the index php? i make line 19 as
if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
 

DanG

Registered User.
Local time
Today, 02:20
Joined
Nov 4, 2004
Messages
477
Thanks for the tips, I'll chech them out!
 

dt01pqt

Certified
Local time
Today, 09:20
Joined
Mar 22, 2004
Messages
271
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

Registered User.
Local time
Today, 02:20
Joined
Aug 4, 2006
Messages
10
Yes, even i feel textpad or notepad is good choie and when save it, youcan chnage the file type.
 

DanG

Registered User.
Local time
Today, 02:20
Joined
Nov 4, 2004
Messages
477
[q]
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
[/q]

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

Certified
Local time
Today, 09:20
Joined
Mar 22, 2004
Messages
271
DanG said:
[q]
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
[/q]

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?
 

DanG

Registered User.
Local time
Today, 02:20
Joined
Nov 4, 2004
Messages
477
Not with me, I'll get it when I go home.

Thank you
 

Users who are viewing this thread

Top Bottom