Let $x \in (0,L)$, $t \in (0,T)$, and let $f_1 = f_1(x,t) \in \mathbb{R}$, $f_2 = f_2(x,t) \in \mathbb{R}$, $u^0 = u^0(x) \in \mathbb{R}$ and $g= g(t) \in \mathbb{R}$ be continuous functions.
My question is:
Can we find a function $u = u(x,t) \in \mathbb{R}$ that satisfies \begin{equation} \partial_t u(x,t) = u(x,t) f_1(x,t) \qquad \text{in } (0,L)\times(0,T) \end{equation} and \begin{equation} \partial_x u(x,t) = u(x,t) f_2(x,t) \qquad \text{in } (0,L)\times(0,T) \end{equation} with additional initial and boundary conditions: \begin{align*} u(x,0) &= u^0(x) & \text{for }x \in (0,L)\\ u(0,t) &= g(t) & \text{for }t \in (0,T). \end{align*}
(Here $\partial_t$ and $\partial_x$ denote the partial derivative with respect to time and space respectively.)
I had though about choosing $u$ as the solution of the transport equation \begin{align*} \begin{cases} \partial_t u + \partial_x u = (f_1+f_2)u & \text{in }(0,L)\times (0,T)\\ u(x,0) = u^0(x) & \text{for }x \in (0,L)\\ u(0,t) = g(t) & \text{for }t \in (0,T). \end{cases} \end{align*} However, I do not know if some supplementary assumption may allow to have $u$ satisfying both equations $\partial_t u = u f_1$ and $\partial_x u = u f_2$ separately.
Any suggestion, reference (e.g. where a function has to satisfy two separate equations as for here), explanation of why it is/is not possible, would be welcome. Thank you.