I have a path in php, that looks like this:
$command = 'cd ' . dirname(__FILE__) . '/../src/python && python3 preview.py'
On my Ubuntu machine that creates a command that look like this and can be executed:
cd /var/www/html/project/../src/python && python3 preview.py
However, if I run the same script on my windows machine, the path looks like this:
cd C:\Projects\project/../src/python && python3 preview.py
Is there a way to make it so it can be called on both platforms equally? I found this but it does not seem to work. Make a path work both on linux and Windows
Any hint appreciated