Проблем: Use of undefined constant

C++ JAVA
Post Reply
User avatar
joorkataa
Турист
Турист
Posts: 487
Joined: Wed Jan 27, 2010 1:37 am
Answers: 26
Location: София

Проблем: Use of undefined constant

Post by joorkataa » Sun Feb 26, 2012 11:32 pm

Може ли да ми кажете от какво излизат тези грешки пробвах с кашички точки запетайки но не се получава пак си седят грешките ;(


Notice: Use of undefined constant USER - assumed 'USER' in C:\xampp\htdocs\video_play.php on line 59

Notice: Use of undefined constant PAROLA - assumed 'PAROLA' in C:\xampp\htdocs\video_play.php on line 60

Notice: Use of undefined constant upload - assumed 'upload' in C:\xampp\htdocs\video_play.php on line 61

Notice: Use of undefined constant porn - assumed 'porn' in C:\xampp\htdocs\video_play.php on line 62

Notice: Use of undefined constant ot - assumed 'ot' in C:\xampp\htdocs\video_play.php on line 71

Notice: Use of undefined constant ot - assumed 'ot' in C:\xampp\htdocs\video_play.php on line 86

Редове 59,60,61 и 62

[php]define(USER, 'admin');
define(PAROLA, 'password');
define(upload, 'no');
define(porn, 'yes');[/php]

Ред: 71

[php]if($r[ot]=='youtube')[/php]

Ред: 86

[php]if($r[ot]=='youtube'){[/php]

User avatar
eddyy93
Потребител
Потребител
Posts: 1421
Joined: Mon Jun 06, 2011 10:32 am

н

Post by eddyy93 » Sun Feb 26, 2012 11:47 pm

Никъде не задаваш стойност на променливите ...

User avatar
lortnoc
Турист
Турист
Posts: 545
Joined: Mon Jul 09, 2007 4:57 am
Answers: 125
Location: Пловдив

Re: Проблем: Use of undefined constant

Post by lortnoc » Mon Feb 27, 2012 7:19 am

Грешките излизат защото не си сложил кавички и php-то приема, че са константи, а пък те не са.

[php]define('USER', 'admin');
define('PAROLA', 'password');
define('upload', 'no');
define('porn', 'yes');
[/php]
[php]if($r['ot']=='youtube')[/php]

[php]if($r['ot']=='youtube'){[/php]

Post Reply