constant

constant

PHP Question: Defining Constants

Question

What does the following code do?

 

define("MY_CONSTANT", array(1,2,3,4,5));

Cross Platform Directory Slashes In PHP

I'm not sure where I found this, but I have been using it on a few projects recently and it's helped a lot. It basically detects what system you are on and will give you a constant that keeps hold of the slash for that system.