A photosensor of the present invention is provided with a photoreflector (1) having: a light emitting element (12) and a light receiving element (13), which are mounted on a substrate (11) a translucent resin (15) that seals the elements and a light blocking resin (2). The photosensor may be also provided with a translucent cover material (20) disposed to face a light emitting/receiving section of the photoreflector (1). A light blocking wall (2a) is formed of the light blocking resin (2) between the light emitting element (12) and the light receiving element (13), and an eave (2b), which is connected to the light blocking wall (2a), and which narrows a light emitting surface above the light emitting element (12), is formed.本發明提供一種光感測器,係具備:光反射器(1),該光反射器係具有已安裝於基板(11)上的發光元件(12)及受光元件(13)、分別封裝這些發光元件(12)及受光元件(13)的透光性樹脂(15)、以及遮光性樹脂(2);或是更具備:透光性的覆蓋材料(20),其面向光反射器(1)的受光及發光部所配置;在發光元件(12)與受光元件(13)之間使用遮光性樹脂(2)來形成遮光壁(2a),並且形成有與遮光壁(2a)連結且用以縮窄發光元件(12)上方之發光面的簷(2b)。1‧‧‧光反射器1a‧‧‧受光及發光面2‧‧‧遮光性樹脂2a‧‧‧遮光壁2b‧‧‧簷11‧‧‧基板11a‧‧‧外部電極11b、11d‧‧‧晶粒焊墊11c、11e‧‧‧接合焊墊12‧‧‧發光元件13‧‧‧受光元件15‧‧‧透光性樹脂L‧‧‧寬度