A connection  for a submersion $\pi\colon E\to M$ is a complementary subbundle $\mathcal H E\subset TE$ of the vertical bundle $\mathcal VE=ker (D\pi).$ A connection locally defines a parallel transport in $E$ along curves $\gamma\colon I\to M$, by lifting to a horizontal curve, i.e., $$\hat\gamma\colon \tilde I\to E;\; \hat\gamma'(t)\in\mathcal HE_{\hat\gamma(t)}.$$ As opposed to the case of linear connections on vector bundles (or principal connections on principal bundles), the parallel transport does not always exist globally on the interval of definition $T$ for $\gamma$, but only exists on relatively open sub-intervals $\tilde I\subset I.$ A connection is called complete if every curve $\gamma$ admits a global horizontal lift.  I think the following observation can be attributed to Ehresmann: A fibration is locally trivial if and only if it admits for all $p\in M$ an open neighbourhood $U$ of $p$ and a connection $\mathcal HE$ which is complete whence restricted to $U\subset M$. In fact, you can use the parallel transport to construct diffeomorpisms $\phi$ as wanted.