notclive Posted June 3, 2006 Share Posted June 3, 2006 if i view the source of a php page i cant see the script i can only see the result of that script. Is there any way of viewing that script? Link to comment Share on other sites More sharing options...
skym Posted June 3, 2006 Share Posted June 3, 2006 <?phphighlight_file("file.php");?> http://ro2.php.net/manual/en/function.highlight-file.php Link to comment Share on other sites More sharing options...
Jack McKalling Posted June 3, 2006 Share Posted June 3, 2006 Other than viewing the file before it has been uploaded, or with a certain online program, you cannot view the php source of any file.You may however, like Skym said, highlight a file. This means you should read the content of a PHP file into a string, and then use the highlifght function to print it coloured. But you even can just leave the colorise, if the file was read into a string you would be able to read the content by just printing or echoing it Link to comment Share on other sites More sharing options...
notclive Posted June 3, 2006 Author Share Posted June 3, 2006 so whould that php file need to be on the same server as my php page that im inserting <?phphighlight_file("file.php");?> into Link to comment Share on other sites More sharing options...
Jack McKalling Posted June 3, 2006 Share Posted June 3, 2006 I am not sure, but I assume it should Actually would be logical it should, else you're able to view the source of everyone else Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now