- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
Hi, I'm used to coding and database environments but somewhat new to MySQL and PHP.
I have created a database using MyPHPadmin and I understand how the PHP code interacts with the database. However, I cannot understand how to execute the PHP code.
I have created one of those simple instruction tests, Hello World, but I cannot even get this to run. If I upload the helloworld.php file to my FTP root-directory and then use my browser to access the file it just shows the content, it does not execute the instructions.
I have also tried embedding the PHP code within the HTML code of the pages on my website, nothing.
I do not understand where to place the PHP code in order for it to interact with my website. Can someone please help.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
I think I know what you are doing wrong.
You need to put the file into your public folder and access it via http, not via ftp, eg go to http://www.yourdomain.com/helloworld.php
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
Hi Dave, I'm not sure that I can post a link to the document as it's on my password protected FTP site. However, a copy of the code is as follows:
<?php
echo 'hello world<br>';
?>
This code is saved in an ANSCI format with a file extension of PHP.
Thank you for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
I think I know what you are doing wrong.
You need to put the file into your public folder and access it via http, not via ftp, eg go to http://www.yourdomain.com/helloworld.php
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
That works, thank you.
I have one more question, when I'm building my webpages using Eazysitewizard Pro, where do I put the PHP code?
Do I write the code into the HTML or do I need to make a call from the HTML to execute the PHP file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
It will be the latter. You will need to upload the php files not using Eazysitewizard Pro, ie using FTP then use the wizard to provide links to your php page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
Sorry to be thick, but are the links to the PHP files made from the HTML code as Eazysitewizard only creates HTML webpages or does a webpage have to be either HTML or PHP (i.e. you cannot 'mix' the types of webpages).
I was hopeing to do most of the page formatting in HTML but then inserting the database entries within the page using PHP. Can I do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
