I'm trying to get a variable dump in my php so I'm using:
print_r(get_defined_vars()); to produce it, but it results in a blank page no matter where I insert the code. Any ideas?
One of the outputted variables may contain HTML,CSS and/or JavaScript-code that prevents the site from being loaded.
Look at the source code (with Ctrl+U in most browsers, or right-click → View Source) instead of the rendered page to see everything that your php script outputs.
Also, make sure that the php code gets actually executed, by inserting an echo "test";. That should show up, at least in the source code.
view-source: in Chrome.Well of course your code is correct, so the reason for the blank page must be that there is some error elsewhere (does the page work if you do NOT put that line in?); maybe your line breaks the syntax of a code block.
Then the error is redirected to php_errors.log or some other file, or maybe is not even generated, and you see a blank page.
Check:
Once you've cleared the upstream error, you should be able to see your output.
print 'test';afterwards, does it displaytest?