I have a c++ dll project, in which, I have embedded some raw data through "resource.rc" file.

IDR_TEMPLATE1           RCDATA                "areaTemplate.bin"


Now I want to access the data of "areaTemplate.bin" file from the dll. How can I read the contents of "areaTemplate.bin" in a byte array?


Question: In PHP, how to detect the execution is from CLI mode or through browser ?
Answer: There is a constant PHP_SAPI has the same value as php_sapi_name().

(available in PHP >= 4.2.0)