kiwigirl Posted September 3, 2012 Report Share Posted September 3, 2012 It's pretty simple to use, just follow the instructions: To use this file, open the file, say on a local host, add ?f= and then the file name you wish to convert I'm sure you're aware, do have the html files in the same place as this attached file: htmlToPhp.php eg. htmlToPhp.php?f=google.html Hope it helps htmlToPhp.php Quote Link to comment Share on other sites More sharing options...
falkencreative Posted September 3, 2012 Report Share Posted September 3, 2012 I'm confused as to what exactly this does. So this opens up a .HTML file, adds the .php extension, <?php and ?> at the beginning and end of the file, and then echos out the entire contents of the original file? ...How is that useful? (I suppose it could be useful as a exercise in learning about opening and saving files, but I don't see the final .php file that the script creates all that useful?). You'd be better off simply renaming the .html file to use a .php extension, keeping the HTML as is, and only adding your PHP code wherever it is necessary. There's absolutely no reason to echo out the entire contents of the HTML file if you can use standard HTML instead and avoid the use of PHP all together. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.