php code in HTML page

I made the freeway page as an HTML. I then placed the code from a commodities firm which gave me the code in PHP. How can I get the PHP to show up on my godaddy acct server using an HTML page?

I changed the page to .php and when i upload to server it says it can’t find the page. I change the freeway page back to HTML and upload it and I can see the page on the server but not the PHP coded item.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I can’t speak for go daddy but it is usually the following:

If you change the page name to myexamplepage.php but call the URL of myexamplepage.html in browser this will end up in 404 - right?

How did you apply the code-snippet?

I usually use crow-bar action suite to add mark-up (seek ActionsForge).

Make sure that it is just the functional part of it and not stuff like body, header things (redundant HTML stuff). If you’re unsure post the code-snippet (or even a page url) to examine.

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks for reply Thomas,

I’m not a developer—thus the reason for Freeway.

You are correct, I get a 404 error after i upload it on my godaddy server.

How do I NOT call the URL myexamplepage.html in the browser.

Not sure what crow-bar action is for.
Don’t understand how to make sure that it is just the functional part of it and not stuff like body, header things…

Pete


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you want to try this (absolutely no guarantees, since it’s GoDaddy after all), you can use this .htaccess directive to pass all HTML pages through the PHP interpreter as if their filenames ended in .php.

<Files *.html>
ForceType application/x-httpd-php
</Files>

To apply this trick, first use an FTP application like Transmit to log into your hosting space. Make sure you turn on View / Show Hidden Files from the main menu. Then see if there is a file named .htaccess (normally hidden, as are any files that begin with a dot on a Unix-like server) already in either your home folder or the htdocs (or public_html or htmldocs or wherever you find your index.html file) folder. If there is already such a file, open it in a text editor by double-clicking the file. (Transmit includes a rudimentary built-in editor, but if it asks you what to use to open the file, please do not choose a “styled text” editor like Word or Pages. You MUST use a programmer’s text editor like TextMate, BBEdit, TextWrangler, or Coda for this task.) If you don’t see such a file, then Control-click in the folder and choose New file… and name the new untitled file as .htaccess (just that, nothing before the dot, no other extension at the end). After you’ve created this file, open it as above, and follow the rest of the directions.

Paste the code above at the very bottom of the file, save, then immediately visit your site and confirm that it still works. If you get a 500-series error, you can just delete that code you added, save, and all will be well. If you don’t get an error, then create a new file called test.html, and within it, put just this one line of code and save:

<?php phpinfo(); ?>

Upload that file to your server, and visit it in a browser. You should see an enormously tall page with a lot of purple on it. If you do, then it works, and you can delete your test file and you can now include PHP directives in your HTML pages without any changes to the file-type extension of those pages.

Walter

On Apr 10, 2014, at 11:14 PM, pete wrote:

I made the freeway page as an HTML. I then placed the code from a commodities firm which gave me the code in PHP. How can I get the PHP to show up on my godaddy acct server using an HTML page?

I changed the page to .php and when i upload to server it says it can’t find the page. I change the freeway page back to HTML and upload it and I can see the page on the server but not the PHP coded item.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

to show up on my godaddy acct server using an HTML page

Are you even sure that your package with GD includes PHP capabilities?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

My server on GD does have php capalities. I have a PHP page on the same server and it shows up fine. It’s the html page, in freeway, that I have to place the php snippet into that doesn’t show up.

the other page is all php (which I paid to have done).
pete


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I changed the page to .php and when i upload to server it says it can’t find the page.

Have you got an FTP app that you can look on your server with to see if the file is physically there after upload? Can you post a link in case there is some sort of Browser/Server cache issue.

Also be aware that FW will alter file names of pages if a page with the same name exists already.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options