I'm not sure about EU law - but if you have a company in Denmark, and want to hire someone who works in Portugal as a permanent employee, and not a contractor, what do you need to do?
At least, you would pay Portuguese taxes for that employee and you would likely need to register with Portugal as an employer.
You'd be in a strange split-brain situation, requiring legal advice. I imagine you could file income taxes in Denmark, and these would be deducted from the worker's Portuguese due taxes under the double taxation prevention agreements.
However, the employee will have to pay taxes where he lives, independent for whom he works for.