A connecting mechanism for mechanically connecting a first case and a second case is provided with a plurality of first members, including a first flat surface and two engaging pieces arranged on the first flat surface. The connecting mechanism is also provided with a plurality of second members, including a second flat surface, an engaging groove arranged on the second flat surface by permittingthe engaging pieces to slidably fit, and a stopper section for preventing the fitted engaging pieces from dropping from the engaging groove. The first member engages with one of the second members through one of the two engaging pieces, and engages with another second member adjacent to the one second member, through the other engaging piece. A hollow section is formed inside the connecting mechanism, in the extending direction of the engaging groove. Thus, a folding portable device wherein the flexible printed wiring board is arranged inside the hollow section is provided.