ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Once you have apache set up correctly you need to access the page through apache. So don't try to view the page directly in your web browser but access through a proper URL which will make the web service (apache) serve up the page after having processed the php.
I just wonder why you use .html extension. I am used to use .php for php code, and I am not sure if php can run in .html file (be parsed). Never the less if you want to use .html file you can include it from .php script. Sense? You can just click on .html file to see the html formatting in browser (If you want to see formatting of page).
I just wonder why you use .html extension. I am used to use .php for php code, and I am not sure if php can run in .html file (be parsed). Never the less if you want to use .html file you can include it from .php script. Sense? You can just click on .html file to see the html formatting in browser (If you want to see formatting of page).
Using a file type of html makes coding simpler. I fixed it by this added to php.conf:
Fine, but how on earth does it make coding simpler?
Whether the extension is html or php, the file contents should be identical.
I use Seamonkey ( Mozilla ) Composer to build the page. Unfortunately he does not support PHP code. I just wanted to LastModified date included. Much simpler with PHP.
I too use the .html extension like you've showed, should be no probs there...
Have done as graemef said:
Quote:
Originally Posted by graemef
Once you have apache set up correctly you need to access the page through apache. So don't try to view the page directly in your web browser but access through a proper URL which will make the web service (apache) serve up the page after having processed the php.
Can you view pages with the .php extension?
After installing server etc I always drop in a test page similar to the following:
Code:
<?php
phpinfo();
?>
I do name 'phpinfo.php', just for testing... it's also comes in handy at times...
I use Seamonkey ( Mozilla ) Composer to build the page. Unfortunately he does not support PHP code. I just wanted to LastModified date included. Much simpler with PHP.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.