Besides the well known Wiener index, which sums up the distances between all the pairs of vertices, and the hyper-Wiener index, which includes also the squares of distances, the edge versions of both indices attracted a lot of attention in the recent years. In this paper we consider the edge-Wiener index and the edge-hyper-Wiener index of phenylenes, which represent an important class of molecular graphs. For an arbitrary phenylene, four quotient trees based on the elementary cuts are defined in a similar way as it was previously done for benzenoid systems. The computation of the edge-Wiener index of the phenylene is then reduced to the calculation of the weighted Wiener indices of the corresponding quotient trees. Furthermore, a method for computing the edgehyper-Wiener index of phenylenes is described. Finally, the application of these results gives closed formulas for the edge-Wiener index and the edge-hyper-Wiener index of linear phenylenes.