Dashcode PHP and MySQL
Hi
First things first. I've come to see Dashcode as a kind of rendering engine for web stuff but it's got much more than that in it. You can get it to serve php, the only problem being that you cannot directly preview the result of a php page being served in the editing mode. Most people get confused about that bit. It's 2 different things.
Happily you can test php in the built-in browser that launches when you build and run. You can of course edit the php code in the edit mode, but the preview just shows the un-served raw code.
To make it work, make sure that you have got php and MySQL running on your machine. I'm assuming you know how to do this?
The apache server does not need to be running, but it helps if you are going to be test publishing dashcode using your users Sites folder or if you have saved a php file there.
That being said you don't need to publish your site to test it in the built-in browser as long as php and MySQL are running on your machine.
Add your php file to your dashcode project and then build and run the project.
Your simulation browser will launch and hey presto the PHP file gets served when you call it just as if it had been served as one of the other commentators put it.
One word of warning - don't go around changing the .html to .php on files generated by dashcode, because that just breaks it. only use .php on files that you create / import.
Interestingly what I was doing was creating a php file to select a MySQL table and return a JSON result set to be used in a datasource. I found that I could just upload the necessary php files to a folder in my dashcode project and point the datasource to the path that would find them. That's the Web service bit, but I also had a web page that was also needed and this too worked in the browser simulator.