Err.. What do you mean by that? You cannot view PHP pages source code without an actual FTP, or anything like that.. Considering it's Server Side, I don't know what you want.. Do you want to get the contents of page? ???
Wait.. Is this remote? Or...?
VillageIdiot can have my babbies ;d
if your making a tutorial and want to display a peice of code in like a scroll bar you can just use good 'ol html. something like this
padding: 1em 1em 0 1em;
border: 1px solid #999;
the text in here will be displayed in a box with scroll bars
the <pre> tag is what allows you to display code to the page.
I am going to try to use it for a tutorial, like one of those "type this code" things, so when you go in the browser you can see the php code and the output at the same time.
highlight_file will do what you want. Create a page with your tutorial and then whenever you have source code, create a separate file for the source code. Use that function to put the source code in your tutorial and have a link to see the file run.
If you want this all in the same file then where you want to have the code displayed you'll have to write out the code so it can be displayed. Where you want the results to be displayed, then you write the code so that it is executable and it outputs the results.
The Following User Says Thank You to wGEric For This Useful Post:
I think I know what he is talking about...
Go to php.net, scroll the page all the way down to the footer and you'll see this link: show source, click it and it will show the source code of that page. This link is clickable in all pages of the site.
The Following User Says Thank You to DeMo For This Useful Post: