What are best practices for specifying file paths in PHP scripts to display images from different directories?

When specifying file paths in PHP scripts to display images from different directories, it is best practice to use the `__DIR__` constant to get the absolute path of the current script and then concatenate it with the relative path to the image file. This ensures that the correct path is used regardless of the script's location on the server.

$imagePath = __DIR__ . '/images/image.jpg';
echo '<img src="' . $imagePath . '" alt="Image">';