you have to use ".." for an above directory. and "/" for below( or inside folder).
So if your trying to grab images form a folder within you directory it has to be :
If its a folder in a directory above the folder containing the file to handle the image it is :
$image = imagecreatefromjpeg("/album/background$bgNum.jpg");
$image = imagecreatefromjpeg("album/background$bgNum.jpg");
++ so if your html or php file is inside a folder trying to get to a folder out side used the second.
$image = imagecreatefromjpeg("../album/background$bgNum.jpg");
just 2 dots: ".."
++ if your html orr php file is in the main trying to retrieve from a folder use the first.
++ PHP dosen't always care about white spaces but try not to leave it between arears of type.