Jump to content

[SOLVED] PHP Source Viewer


eRott

Recommended Posts

Well, I've decided I wanted to create something similar to php.net's source code viewer. Example: http://www.php.net/source.php?url=/index.php

 

Yet, I have no idea where to begin. Does anyone have an resources I could perhaps read up on or anything of the sort?

 

Obviously, you may be thinking to yourself, if I can see the source of even the page which shows you the source of other pages, then why the hell don't I just learn from that. Good question. Probably because I am unfamiliar with some of the functions they used. Such as ini_set(). I've never really used that function let alone know what it does. Of course, I read up on the function on php.net but even still, it does not help me to the point of understanding what the following chunk of code does and what role it plays.

 

<?php
// Use class names instead of colors
ini_set('highlight.comment', 'comment');
ini_set('highlight.default', 'default');
ini_set('highlight.keyword', 'keyword');
ini_set('highlight.string',  'string');
ini_set('highlight.html',    'html');
?>

 

Links, tips, comments--all helpful. Thanks.

 

Take care.

Link to comment
https://forums.phpfreaks.com/topic/106890-solved-php-source-viewer/
Share on other sites

Shoot. Time ran out. Can't edit first post.

 

Moving on. I have learned of the PHP function show_source. Going to have to read up on it but I think I've answered my question. Amazing isnt it. PHPfreaks comes through once again and yet no one even had to post.

 

Take care.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.