Jump to content

Recommended Posts

Posted

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

Posted

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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...