php help

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
J. Baker
-


Joined: 10 Jul 2004
Posts: 2

PostPosted: Sat Jul 10, 2004 8:06 am    Post subject: php help Reply with quote

Ok, why does this work?
Code:
<?php phpinfo(); ?>


But this gives me the following error?
Code:
<?php
$name = Kirupa;
print($name);
?>


Error:
Notice: Use of undefined constant Kirupa - assumed 'Kirupa' in C:\Program Files\Abyss Web Server\htdocs\test\test.php on line 2
Kirupa


Thanks
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sat Jul 10, 2004 9:07 am    Post subject: Reply with quote

thats not a error , its a Notice , go to your php.ini usually in
C:\Windows and change error_reporting = E_ALL; to this.

error_reporting = E_ALL & ~E_NOTICE;
Back to top View user's profile Send private message Visit poster's website
MUGH8506
-


Joined: 14 Jun 2004
Posts: 72
Location: Hell

PostPosted: Sat Jul 10, 2004 11:03 am    Post subject: Reply with quote

TRSTpunk,

You are great!!
_________________

http://www.trustabyss.com/
Back to top View user's profile Send private message MSN Messenger
J. Baker
-


Joined: 10 Jul 2004
Posts: 2

PostPosted: Sun Jul 11, 2004 5:33 am    Post subject: Reply with quote

Thanks alot! :)
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sun Jul 11, 2004 5:52 am    Post subject: Reply with quote

No problem ! Glad I can Help :)
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Jul 11, 2004 7:35 pm    Post subject: Re: php help Reply with quote

The notice suggested that your code is not "100% correct." The problem comes from the line:

Code:

$name = Kirupa;


Kirupa is a string of characters so it is recommended (and sometimes mandatory) to enclose it between two " symbols:

Code:

$name = "Kirupa";

_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Jul 11, 2004 7:38 pm    Post subject: Re: php help Reply with quote

The notice suggested that your code is not "100% correct." The problem comes from the line:

Code:

$name = Kirupa;


Kirupa is a string of characters so it is recommended (and sometimes mandatory) to enclose it between two " symbols:

Code:

$name = "Kirupa";

_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group