Use of undefined constant

Please post answers on the most frequently asked questions about CMSimple
twc
Posts: 224
Joined: Fri Jun 18, 2010 12:25 am
Location: Netherlands
Contact:

Use of undefined constant

Postby twc » Fri Dec 16, 2016 11:03 am

Dont now what to do....? please help

NOTICE: Use of undefined constant News - assumed 'News'
/home/fiberd1q/public_html/templates/fiber/template.htm:110
NOTICE: Use of undefined constant News3 - assumed 'News3'
/home/fiberd1q/public_html/templates/fiber/template.htm:146
NOTICE: Use of undefined constant News4 - assumed 'News4'
/home/fiberd1q/public_html/templates/fiber/template.htm:158
NOTICE: Use of undefined constant News5 - assumed 'News5'
/home/fiberd1q/public_html/templates/fiber/template.htm:161
Image

cmb
Posts: 10751
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Use of undefined constant

Postby cmb » Fri Dec 16, 2016 11:15 am

twc wrote:NOTICE: Use of undefined constant News - assumed 'News'
/home/fiberd1q/public_html/templates/fiber/template.htm:110

That looks like you have something like the following code in the template:

Code: Select all

<?php echo newsbox(News)?>

However, News should be written in quotes:

Code: Select all

<?php echo newsbox('News')?>

See also http://php.net/manual/en/language.types.array.php#language.types.array.foo-bar.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

twc
Posts: 224
Joined: Fri Jun 18, 2010 12:25 am
Location: Netherlands
Contact:

Re: Use of undefined constant

Postby twc » Fri Dec 16, 2016 1:37 pm

cmb wrote:
twc wrote:NOTICE: Use of undefined constant News - assumed 'News'
/home/fiberd1q/public_html/templates/fiber/template.htm:110

That looks like you have something like the following code in the template:

Code: Select all

<?php echo newsbox(News)?>

However, News should be written in quotes:

Code: Select all

<?php echo newsbox('News')?>

See also http://php.net/manual/en/language.types.array.php#language.types.array.foo-bar.


thanks..... :D ..... sometimes you see to mutch for your eyes cant see the problem
Image


Return to “FAQ's”

Who is online

Users browsing this forum: No registered users and 0 guests