Tool I made that you might find handy

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply

What do you think of this tool?

Awesome!
0
No votes
Useful.
0
No votes
Not useful.
2
100%
Kill this program with fire!
0
No votes
Dude, you can already do that with _____!
0
No votes
 
Total votes: 2

SlimFastForYou
Forum Newbie
Posts: 1
Joined: Fri Jan 02, 2009 7:48 pm

Tool I made that you might find handy

Post by SlimFastForYou »

PHPToValidHTML.zip
Contains program executable, source code for Visual C#, screenshot, and URL to my web site
(61.31 KiB) Downloaded 27 times
Hi,

I'm new to the forums (first post!) and after all the help I've gotten from reading posts on various php programming communities, I thought I'd give a little something back to you guys. (Hopefully I'm posting this to the right forum)

Image

This tool turns your PHP files into HTML files that WYSIWYG editors can more easily handle - while still allowing your PHP code to execute. Any <?php ?> blocks you have in your file will have comments applied in such a way that web page editors will embed your php code as an HTML comment inside text that says "

Code: Select all

".

[img]http://www.problemsolvedcomputing.com/nchotspot/PHPToValidHTML/wysiwyg%20view.jpg[/img]

For example, some simple inline PHP with HTML inline:

Code: Select all

<p><b>Record Label: </b><?php echo $RecordLabel; ?></p>
Will be saved like:

Code: Select all

<p><b>Record Label: </b>[<!--<?php echo "-"."->";  echo $RecordLabel; echo "<!-"."-";?>-->PHP] </p>
To a web page editor or browser opening as a .html it will look like:
Record Label:

Code: Select all

[/quote]
To a web browser opening from a server that used the PHP interpreter on the file:
[quote]Record Label: [Universal MusicPHP][/quote]

You can easily convert back and forth between .php and .php.html files.  So for instance if you're using Eclipse for PHP coding and wanting to use Dreamweaver for laying out the HTML thats embedded in the PHP file, this tool should make that a snap.

Well, hope you guys enjoy.  Let me know if there's other sites you think would like to have this posted to.
Post Reply