You are here: RE: [PHP] beginner needs help! « PHP « IT news, forums, messages
RE: [PHP] beginner needs help!

Posted by Richard Lynch on 05/13/05 02:04

On Thu, May 12, 2005 12:36 pm, Jay Blanchard said:
> [snip]
> Thank you for your response Jay, but that is not working. My program
> will not run at all with the following:
>
> var $exportFile = "Export." . date("mdy") . ".txt";
>
> I seem to be able to use the date function is I am not starting the
> declaration with "var", but then my program is not working correctly.
> [/snip]
>
> You may have to assemble it beforehand sort of ...
>
> $exportFileName = "Export." . date("mdy") . ".txt";
> var $exportFile = $exportFileName;

PHP has no 'var' at all, anyway, *EXCEPT* inside a 'class' definition, and
PHP5+ has better keywords (public/private/ etc) to use instead of 'var'

Furthermore, where you do have var in PHP, you can ONLY provide it with a
constant. It cannot be a derived value. Not a variable. Not an
expression. A constant.

Disclaimer: I don't use classes, so maybe I'm wrong... But I think I got
this one right.
--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this 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

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