Reply to Re: Newbie - Notice:Use of undefined constant

Your name:

Reply:


Posted by rush on 06/14/05 12:38

"darren" <darren@NOSPAMemdnet.co.uk> wrote in message
news:d8m3nf$bau$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
> Hello I have just copied the code below from a book and I get the
following
> errors but the code does actually work. Is it a problem with relative
> paths?

nope, it is problem with undeclared string constants.

Older versions of php would let you write something like:

$a = some_my_stuff ;

if some_my_stuff was not declared at this point as constant, php would
autodeclare it to be 'some_my_stuff'

So number of people got used to write some simple string constants (like
some_my_stuff) without quotes, which was rather sloppy habit. To mittigate
situations never versions of php started complaining about it.

Best thing you can do is to go through your list of errors, and on each line
mentioned you will find some unquoted string constant (also mentioned in
error message). Put quotes aroind it, and you are done.

rush
--
http://www.templatetamer.com/
http://www.folderscavenger.com/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация