0

I've written a patch for a GPL'ed JavaScript library. To check how the patch works one needs sample CGI (or PHP) backend.

I want to write a demo PHP to show that my JS works and put the open code on my site.

The question: What it the best way to have PHP on server both executed and viewed as the source?

Note that recently I have ordered a Virtual Private Server with a 5 Gb disk, so there are no troubles with installing new software (if any needed) for me.

asked Mar 14, 2013 at 22:55

1 Answer 1

1

The official PHP website itself , I believe, is a good example.

For every page, you have a link to its source code at the bottom of it. For example the download page has its source available publicly; by the way, the page which displays the source can display its own source as well.


As a side note, while the concept of showing both the runtime result of the page and its source code is interesting on php.net, make sure to watch only the concept itself, not the source code of the downloads page. After browsing it, I'm quite surprised about how terrible it is.

answered Mar 14, 2013 at 23:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.