Q:

How can the wikipedia api hide their source code?

I have a wiki api site:
http://en.wikipedia.org/w/api.php
when I save the api.php, I can't see any post or get method behind that.... but I try to write a simple php program.... like this
test.php:
<?php echo("testing"); ?>

when I updated to server, and save the test.php, people can see my source code. but after I downloaded the api.php, I don't see any php source code from the api.php, but I can pass parameter to the api.php, how can they do so? Thank you.

A:

Because when you hit that Wikipedia api.php page, you get an HTML document. You're not downloading any Wikipedia source code. You're downloading the output of a PHP script running on a Wikipedia server, and that output happens to be HTML.
As for your test file, since you get the source code instead of "testing", that means your server isn't properly configured and isn't seeing a .php file as a PHP script, and is instead serving up its raw contents.

A:

If you uploaded a file to your server that contained php, and when you view source in your browser you see that php code, that means that your server is not executing your php. It would be parsed out naturally if it was. 

