I have a file, showcaptcha.php
, that outputs an image.
I was referencing it like this:
<img src='/security/showcaptcha.php'>
It worked fine, so no problem with the code inside showcaptcha.php
.
However, now I moved that php file outside doc root for security reasons. Putting php files outside doc root is good practice b/c it makes it harder for hackers to access any source code.
but now, what do I put in the src of my img?
<img src='???showcaptcha.php'>
or
<img src='<?php echo ??? ?>'>