PHP打印原始字符串

I need to print CURL headers as a raw string, so with all of the and anyone could tell me how to?

I tried print_r and few other but it hasn't worked

I'm not really sure exactly what you're after, but you might try:

$headers = str_replace(array("","
"),array("\","\
"),$headers);

Before printing your string assume that name is $s :

$s = str_replace(array(" ", ""), array(' ', ''), $s);

then print or echo it:

echo $s;

Use the var_export function:

echo var_export($s, true);