I am a newbie to the world of webdesign and my experience is one website old.I am reading the basic text books on php and viewing the tutorial videos on YouTube and have the following question.
The textbook advises me to code php along with html and save it as index.php and “ put it onto your php enabled server”—On which folder on the server am I supposed to upload my index.php file to.There is also an index.html file which contains the same html code excepting the php part which I have uploaded to public_ html folder on the server.
When it comes to running the webpage which of these two files will have precedence-?
Can anyone explain my problem?
Regards,
php file upload
Moderator: General Moderators
-
protopatterns
- Forum Newbie
- Posts: 9
- Joined: Sun Jan 28, 2018 11:18 am
Re: php file upload
public_html/carllwyman wrote:On which folder on the server am I supposed to upload my index.php file to
It depends how the server is configured. But if you're programming in PHP, there's no need for anything to have an .html extension anymore, because PHP includes all of HTML.When it comes to running the webpage which of these two files will have precedence
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: php file upload
You can confirm the setting by having both files in public_html/ and see which one is displayed. In the end, you should only have one of them in the directory.carllwyman wrote:When it comes to running the webpage which of these two files will have precedence-?
(#10850)