php - Accessing a defined constant returns messed up characters -
this strange have constant defined such:
define("rj_files_path", rj_site_directory."\assets\files\\");   however when try access constant in code weird result on localhost..
c:\wamp\www\my.app\assetsiles\2688   the \f replaced square indicating unrecognised character. whats happening because of unable save files folder constant supposed point to. 
you need escape backslashes before a , f:
define("rj_files_path", rj_site_directory."\\assets\\files\\");   otherwise they're interpreted escape codes, since they're within string. (just \n newline, et cetera.)
Comments
Post a Comment