Free Web Hosting Forum
Go Back   Free Web Hosting Forum > Website Building > Web Programming
Reload this Page Php content do not run but Html
Reply
 
Thread Tools Display Modes
(#1 (permalink))
Old
Junior Member
am84pm is on a distinguished road
 
Posts: 6
Join Date: Apr 2012
Question Php content do not run but Html - 04-30-2012, 12:45 PM

I have a file which is hi.php .
inside this file I have <?php echo 'Hi guys!' ;?> plus some HTML content like this is html.
the problem is I can't see any of my php code but I can see the "This is html" which is inside the hi.php but inside the <body>This is html</body> I can see. In fact I can run this very nice with local host but when I upload it with ftp filezilla I have this problem. I think I need to config the php in 000webhost.com . please advice me how can I solve this issue. thanks in advance
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
ShocK's Avatar
Senior Member
ShocK is on a distinguished road
 
Posts: 4,106
Join Date: Jul 2011
Location: UK
Default 04-30-2012, 12:55 PM

I think it has to be "Hi guys" not 'Hi guys'
Reply With Quote
(#3 (permalink))
Old
Junior Member
am84pm is on a distinguished road
 
Posts: 6
Join Date: Apr 2012
Default 04-30-2012, 01:07 PM

Just changed it but the same result!. the project is working perfect at localhost but got problem here. Please if know how can I get rid of it tell me. tnx

Last edited by am84pm; 04-30-2012 at 01:11 PM.
Reply With Quote
(#4 (permalink))
Old
d3iti's Avatar
Super Moderator
d3iti is on a distinguished road
 
Posts: 6,528
Join Date: Jul 2009
Location: Spain
Default 04-30-2012, 01:52 PM

Statement that you've written (without variables) you can use single quotes and double quotes.
Note that in your statement you put together the semicolon ";" indicating to instruction finish and closing php tag "?>".
Try the following code:
PHP Code:
 <?php echo'Hi guys!'?>
If this fails, give the address of the website to find the problem.


Recuerda realizar copias de seguridad de tus sitios web. Si este mensaje te ayudó puedes pulsar sobre el botón karma

Last edited by d3iti; 04-30-2012 at 01:54 PM.
Reply With Quote
(#5 (permalink))
Old
Junior Member
am84pm is on a distinguished road
 
Posts: 6
Join Date: Apr 2012
Default 04-30-2012, 02:04 PM

thanks for the reply d3iti but is there any differences between the one i mentioned and the one you wrote? I copy paste yours but still I have problem. Someone told me because I'm using the free web hosting php is not enabled. what you think? As I mentioned earlier, the code is working in Localhost perfectly. so no syntax or logical error.thanks in advance
Reply With Quote
(#6 (permalink))
Old
d3iti's Avatar
Super Moderator
d3iti is on a distinguished road
 
Posts: 6,528
Join Date: Jul 2009
Location: Spain
Default 04-30-2012, 02:38 PM

Free web hosting have PHP enabled.

Write the address of your website and we can directly see the problem.

It is also possible that your php code you are writing outside the <body> of your html file.


Recuerda realizar copias de seguridad de tus sitios web. Si este mensaje te ayudó puedes pulsar sobre el botón karma
Reply With Quote
(#7 (permalink))
Old
nevermore93's Avatar
Senior Member
nevermore93 is on a distinguished road
 
Posts: 298
Join Date: Dec 2011
Location: USA
Default 04-30-2012, 02:44 PM

Quote:
Originally Posted by am84pm View Post
thanks for the reply d3iti but is there any differences between the one i mentioned and the one you wrote? I copy paste yours but still I have problem. Someone told me because I'm using the free web hosting php is not enabled. what you think? As I mentioned earlier, the code is working in Localhost perfectly. so no syntax or logical error.thanks in advance
The PHP code works fine here. Please post a link to the page your are testing, and I'm sure we can find the problem.


Reply With Quote
(#8 (permalink))
Old
Junior Member
am84pm is on a distinguished road
 
Posts: 6
Join Date: Apr 2012
Default 05-01-2012, 05:19 AM

here is the address : http://2rists.net16.net/hi.php Modified by moderator

Last edited by d3iti; 05-01-2012 at 07:46 AM. Reason: To use the FTP access is necessary username/password FTP
Reply With Quote
(#9 (permalink))
Old
nevermore93's Avatar
Senior Member
nevermore93 is on a distinguished road
 
Posts: 298
Join Date: Dec 2011
Location: USA
Default 05-01-2012, 05:30 AM

I see: "this is only a testHiiiiiiiii HTML "

What should I see?


Reply With Quote
(#10 (permalink))
Old
Junior Member
am84pm is on a distinguished road
 
Posts: 6
Join Date: Apr 2012
Default 05-01-2012, 05:41 AM

You right click and view source. you will see there is a php code in it which does not run. it only shows the html
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com