Linked Questions
40 questions linked to/from What does the PHP error message "Use of undefined constant" mean?
24
votes
5
answers
47k
views
Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' in functions.php on line 73 [duplicate]
I recently moved my website into a new server , my database is perfectly configured but i keep getting this error and can't access my wp-admin :
Use of undefined constant REQUEST_URI - assumed '...
26
votes
5
answers
173k
views
Undefined constant error in php 7.2 [duplicate]
I have theses errors in php v7.2 but don't see any E_WARNING when using php v7.1.
How can I resolve following errors?
/web13/web/boutique/includes/Sites/Shop/NavigationHistory.php on line 39
...
1
vote
2
answers
31k
views
How do I resolve the error "PHP Notice: Use of undefined constant"? [duplicate]
I have a strange error message after using the post to wall function. It did successfully post to the wall however i got a very weird strange error.
[30-Jan-2012 23:36:49] PHP Notice: Use of ...
1
vote
3
answers
6k
views
Use of undefined constant login - assumed 'login' (this will throw an Error in a future version of PHP) when trying to logout [duplicate]
when ever i want to logout, it always show "Use of undefined constant login - assumed 'login'" error. what did i do wrong?
web.php
route::get('/logout','AuthController@logout')->name('logout');
...
3
votes
3
answers
6k
views
How do I make PHP understand that DOCUMENT_ROOT is not a string? [duplicate]
Notice: Use of undefined constant DOCUMENT_ROOT - assumed 'DOCUMENT_ROOT' in /home/syole/public_html/includes/config.php on line 21
Notice: Use of undefined constant DOCUMENT_ROOT - assumed '...
2
votes
3
answers
4k
views
What is the meaning of the "Use of undefined constant" notice in PHP? [duplicate]
Notice: Use of undefined constant username - assumed 'username' in
/home/content/04/7195304/html/header.php on line 54
I get this when writing things like $_COOKIE[username] or $_POST[username].
Edit
...
-3
votes
1
answer
7k
views
Use of undefined constant in php [duplicate]
don't know better title for this, but here's my code.
I have class user that checks form data when it's instanciated but I get following errors/notices:
Notice: Use of undefined constant username - ...
1
vote
1
answer
23k
views
How to fix Warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) in PHP? [duplicate]
Warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) in /home/conteud2/public_html/include/meta.php on line 114
variate code using {var2[id]} no ...
-1
votes
1
answer
14k
views
Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in * on line 1 [duplicate]
I'm following the tutorial here to create a login page using MySQL. The code seemed to be working flawlessly when I left my computer 2 days ago. Now I come back to work on it, haven't changed anything,...
-1
votes
2
answers
10k
views
Notice: Use of undefined constant method - assumed [duplicate]
Hello i'm using sms sender in php and i'm getting this error
Notice: Use of undefined constant method - assumed
that's my code
<?php
////////
/* Sender SMS */
////////
$request =""; //...
1
vote
1
answer
3k
views
Notice: Use of undefined constant success - assumed 'success' [duplicate]
Anyone able to assist on fixing this one annoying error been trying for like 30minutes.
<?php
if(isset($_POST['statusBtn']))
{
$username = htmlspecialchars($_POST['address']);
strtolower($...
-4
votes
2
answers
11k
views
Use of undefined constant [duplicate]
Hi I have this error in my website
my website is wordpress 4
i use post format
in post format i create this php to if page has quote post then dont load title and image and etc from quote post just ...
0
votes
3
answers
2k
views
Use of undefined constant j - assumed 'j' [duplicate]
Im creating a scraping code that scrape each Address in a specific suburbs. but im stuck in this problem; " Use of undefined constant j - assumed 'j'" and it identified in $target_url can ...
-2
votes
1
answer
1k
views
How to use PHP constants correctly post PHP 7.2? [duplicate]
I am using some of the available constants in PHP to show the date and time in a particular format:
$created_date=date(Y.'-'.m.'-'.d.'\T'.H.':'.i.':'.s.'\Z',$created_timestamp);
Since updating from ...
-1
votes
1
answer
1k
views
PHP use of undefinined constant error [duplicate]
Hey getting an error on my code can anyone tell me how to fix it?
Notice: Use of undefined constant folder - assumed 'folder' in C:\xampp\htdocs\a\gallery.php on line 74
Notice: Use of undefined ...