Destramic Posted August 28, 2011 Share Posted August 28, 2011 hey guys i used defined variables inside my index.php and these defined varaibles are called and used through the site...is this good or bad? defined varaibles define('DS', DIRECTORY_SEPARATOR); define('PARENT_DIRECTORY_PATH', dirname(dirname(__FILE__)) . DS); define('PUBLIC_DIRECTORY', BASE_URL . DS .'public' . DS); define('PRIVATE_DIRECTORY', BASE_URL .'private' . DS ); thank you Link to comment https://forums.phpfreaks.com/topic/245923-defined-variables-goodbad-practice/ Share on other sites More sharing options...
Pikachu2000 Posted August 28, 2011 Share Posted August 28, 2011 Those are constants. Link to comment https://forums.phpfreaks.com/topic/245923-defined-variables-goodbad-practice/#findComment-1262983 Share on other sites More sharing options...
Destramic Posted August 28, 2011 Author Share Posted August 28, 2011 my bad...but can you tell me if it is good or bad practice to use them the way i said? Link to comment https://forums.phpfreaks.com/topic/245923-defined-variables-goodbad-practice/#findComment-1262984 Share on other sites More sharing options...
Pikachu2000 Posted August 28, 2011 Share Posted August 28, 2011 I don't see a problem at all in doing that. Link to comment https://forums.phpfreaks.com/topic/245923-defined-variables-goodbad-practice/#findComment-1262987 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.