woosterbert Posted August 13, 2008 Share Posted August 13, 2008 Hello everybody or anybody, Newbie Alert. I have put my website together with XsitePro because I am not really happy with code, some people can read it like English but to me it is as intelligible as Cyrillic, Mandarin or Arabic. My problem is that somebody needs me to use a page that is a .php rather than .html . I have created the page in html and have dropped a line of php code to drop into it and I have put the .php at the end instead of html but when I click on the link to go to the page, instead of the page, I get a download box telling me that it is a php script and would I like to download it or open it. When I click on open it the file opens in Macromedia not in my browser. Can anybody tell me what may be going on. Any help will be much appreciated. Bertie Quote Link to comment https://forums.phpfreaks.com/topic/119536-newbie-needs-help-with-a-php-file/ Share on other sites More sharing options...
revraz Posted August 13, 2008 Share Posted August 13, 2008 The server you put the page one needs to support PHP, so if you put it on your local machine, you won't be able to parse it. Quote Link to comment https://forums.phpfreaks.com/topic/119536-newbie-needs-help-with-a-php-file/#findComment-615815 Share on other sites More sharing options...
ignace Posted August 13, 2008 Share Posted August 13, 2008 php is not supported on your server Quote Link to comment https://forums.phpfreaks.com/topic/119536-newbie-needs-help-with-a-php-file/#findComment-615816 Share on other sites More sharing options...
woosterbert Posted August 13, 2008 Author Share Posted August 13, 2008 Hi Guys thank you for your replies. I am sure that my server supports php because I have other things that I am sure use php like WordPress , phplist and an ecard program that I use. I am confused between making a page in html yet using the file name php because that is the file type that is required. It only has one line of php code which is used to go and get some new content. I hope this clarifys things Bertie Quote Link to comment https://forums.phpfreaks.com/topic/119536-newbie-needs-help-with-a-php-file/#findComment-615872 Share on other sites More sharing options...
wildteen88 Posted August 13, 2008 Share Posted August 13, 2008 All PHP code (HTML can be placed in the file too) must be saved within a .php file, eg filename.php You wont be able to run .php files locally, unless you have the AMP stack installed. Quote Link to comment https://forums.phpfreaks.com/topic/119536-newbie-needs-help-with-a-php-file/#findComment-615899 Share on other sites More sharing options...
woosterbert Posted August 13, 2008 Author Share Posted August 13, 2008 Hi Wildteen Thank you for your input. Unfortunately I have no idea what AMP stack is. All I know is that this page, with the php file name, will sit on the server and receive files (articles) that should be able to be viewed by other people who click on the link to the page. I am sorry to be such a rube, I think that is the problem with these web building programs, it lets idiots like me build things without really knowing what goes on under the hood, then when things go tits up we are in the deep brown stuff without a clue. Well its getting late here in the UK so I am of to bed but I will be checking in the morning. Thanks again Bertie Quote Link to comment https://forums.phpfreaks.com/topic/119536-newbie-needs-help-with-a-php-file/#findComment-615921 Share on other sites More sharing options...
revraz Posted August 13, 2008 Share Posted August 13, 2008 I have a feeling that you didn't rename the file correctly if other PHP pages run fine. You can have all HTML in a .php file and it would work fine. I agree 100% with you about web building programs though. Quote Link to comment https://forums.phpfreaks.com/topic/119536-newbie-needs-help-with-a-php-file/#findComment-615950 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.