Re: CONSTANTS in one site affecting CONSTANTS in another site Programming Web Development by Virangya …LIB.'database.php'); ?>[/CODE] config.php file defines the constants [CODE]<?php session_start(); error_reporting(E_ALL); ini_set("display_errors&…quot;, 1); //databse related constants define('SERVER','localhost'); define('UNAME','root'); define('PASSWORD',''); define('DB_NAME… Re: CONSTANTS in one site affecting CONSTANTS in another site Programming Web Development by Virangya …;]here[/URL]'s another way to check your constants.[/QUOTE] actually these same constants are defined in a file in another directory… CONSTANTS in one site affecting CONSTANTS in another site Programming Web Development by Virangya HI CONSTANTS in my customer site are affecting my admin site. i … Re: CONSTANTS in one site affecting CONSTANTS in another site Programming Web Development by pritaeas Although consistent use of require_once should avoid this problem, [URL="http://www.electrictoolbox.com/tell-if-php-constant-defined-already/"]here[/URL]'s another way to check your constants. Binary constants??? Programming Software Development by m610 …the device I am programming. [quote][b]Numeric constants[/b] Numeric constants must be integers, and their values must be …648 and 4,294,967,295. By default, numeric constants use decimal notation, but the built-in assembler also… F. For example, 0BAD4H and $BAD4 are hexadecimal constants, but BAD4H is an identifier because it starts with … Re: codeigniter constants Programming Web Development by cereal …function setConstants() { $query = $this->CI->db->get('constants'); foreach($query->result() as $row) { define((string)$row->…// or echo $this->config->item('color_dodger_blue'); **BUT**, since constants are not meant to change after the installation, I would… Making global constants/Making constants global Programming Software Development by MattEvans Is there a standard way to make constants defined using the [inlinecode]use constant[/inlinecode] pragma …an executed file? Or even better, to make the constants defined in a package available to other packages that … inherit another package). That means having to declare certain constants multiple times. Which kind of defeats the purpose of … Magic Constants Case Sensitive or case In-sensitive ? Programming Web Development by UI …htm It says: "PHP Magic constants PHP provides a large number of predefined constants to any script which it runs.… There are five magical constants that change depending on where they are used. For example…it's used on in your script. [b]These special constants are [u]case-insensitive[/u] and are as follows[/… Re: Making global constants/Making constants global Programming Software Development by MattEvans … I ended up doing; I like the 'keyword' appearance of constants though. like STATUS_ERROR instead of $STATUS_ERROR :lol: [quote] the other… Machine Constants in Javascript? Programming Web Development by DavidB …point calculations. The program uses several built-in machine constants to help it quantify and limit computer round-off …error. For example, it includes the constants DBL_MIN and DBL_EPSILON from the <cfloat> library…C++. I am now wondering: does Javascript offer these constants as built-in values too? I suppose I could … php predefined constants are not working Programming Web Development by drastic hi, i am using php version 4.1.3 and i was using php constants like _FILE_ and _LINE_ in echo statements but when i run these statements in browser they give error that constants are undefined but other php constants like one for php version and operating system work quite well.. what might be the possible reason for this? Re: php predefined constants are not working Programming Web Development by drastic …lt;html> <head> <title>php constants</title> </head> <body> …data a\a\miscallaneous data\ebooks\web languages\myphp\test\constants.php on line 9 This file is _FILE_ Notice:… a\a\miscallaneous data\ebooks\web languages\myphp\test\constants.php on line 10 This is line number _LINE_ … Re: php predefined constants are not working Programming Web Development by sjoscelyn … php version 4.1.3 and i was using php constants like _FILE_ and _LINE_ in echo statements but when i… these statements in browser they give error that constants are undefined but other php constants like one for php version and operating… Re: Binary constants??? Programming Software Development by weinelb … confusion stems from the fact that the "[B]Numeric Constants[/B]" section you cite says "[I]but the… Defining Constants Programming Software Development by johndmingione I'm having some trouble defining constants correctly. I know the format should be this: Const CONSTANT_NAME […. I don't think all of it needs to be constants, but maybe it does? I'm not sure. All I… that I was using therefore, having to define my own constants. As stated previous, here and in the other Thread, I… Errcodes as string constants Programming Software Development by it@61@sec Does C++ have predefined text constants / string constant to be used as replacements for digits when … the value 17, but (maybe) there are some predefined string constants / text constants defined in a standard header-file somewhere ? WindowConstants' Constants, or JFrame's Constants? Programming Software Development by Doogledude123 … close operation for JFrames, should you use JFrame's constants or WindowConstants' constants? As far as I can tell they're the… Re: Magic Constants Case Sensitive or case In-sensitive ? Programming Web Development by JamesCherrill I'm not a php user, but just reading what you posted... these constants have a name and value (which depends on the context). The name appears to be case-insensitive (ie LINE Line line are all valid), but the values follow case-sensitive rules as above. Maybe a php buff can confirm or correct that. Re: Machine Constants in Javascript? Programming Web Development by ~s.o.s~ … using to find out the value of those in-built constants and put the same in a JS file and include… Re: Machine Constants in Javascript? Programming Web Development by MidiMagic … you. Use: [inlinecode]Number.MIN_VALUE[/inlinecode] JS provides the following constants: [inlinecode]Number.MIN_VALUE[/inlinecode]: The smallest positive value which can… Re: php predefined constants are not working Programming Web Development by drastic sorry actually i m new to php so i thought that file and line constants also do not need to be supplied values expilcitly. thanx Re: difference between macros and constants Programming Computer Science by sarehu This isn't really a general computer science question, it's more of a language-specific one. The definition of 'macro' and 'constant' varies from language to language. In some, constants aren't constants, and in others, macros aren't macros. And in some, macros must "have a data type" and in some, constants don't have to. Creating a header file with physical constants Programming Software Development by marksmania …'m trying to create a header file with some physical constants. The Planck constant is giving me trouble due its tiny…;stdio.h> #include <math.h> #include "constants.h" double a; int main() { a=H; printf("… Re: declaring and using constants Programming Software Development by d5e5 Instead of using separate scalar constants you could use an array of constants that you can iterate through.[CODE]#!/usr/bin/perl… strict; use warnings; # Use a constant array instead of separate constants use constant SERVERNAMES => qw(//firstserver/somedir/ //secondserver/somedir/ … Are enum constants static members or instances of the enum type ? Programming Software Development by daudiam … Khalid Mughal and I came across a statement [QUOTE]Enum constants are static members[/QUOTE] and another [QUOTE]Enum constant is…]. I am unable to reconcile the 2 statements. Are the constants static members or are they instances ? (Instances means using new… Global constants and tic tac toe Programming Software Development by Melly3 … Python the absolute beginner. How could I edit the global constants so the user could pick the pieces or should I… just remove them all together? # global constants X = "X" O = "O" EMPTY = "… codeigniter constants Programming Web Development by iamthwee … view might be blue, so I save this in the constants file. define('blue', '#3fsefe'); Now I can use this in… extending the controller class http://stackoverflow.com/questions/11446677/codeigniter-constants-in-application-config-constant-php-from-db-table but that… Class constants that work with inheritance Programming Web Development by Dani For some reason, PHP class constants don't play nicely with inheritance. For example, suppose you …. The problem, unfortunately, is that this doesn't extend to constants. The solution to this problem is to use ReflectionObjects. The… Re: Class constants that work with inheritance Programming Web Development by pritaeas Why not use `static` in your first example? ``` public function __construct() { echo static::VAR; } ``` Based on [this link](https://www.php.net/manual/en/language.oop5.constants.php), see the comment about late static binding. Escape Sequences or Accepting Double Quotes in String Constants Programming Software Development by SlyMaelstrom … anyone know the code to accept double quotes in string constants?