August 20, 200917 yr does 'php include' work when viewing locally? I'm just experimenting but nothing appears. this is the code.. <?php include('test.php'); ?> and this is whats in test.php... <h1>This is a test</h1> both files are in the same folder.
August 20, 200917 yr You will have to use XAMP (think thats spelt right) or WAMP and view it from your localhost folder. if you do not do that it will just appear blank as you wont be running the website off a server and XAMP and WAMP and servers that you can run locally on your machine. but the way you have done your include is correct. can also use "" instead of '' Ben
August 21, 200917 yr Here are the instructions for downloading and installing Wampserver and adding your website site to the server. (If you have windows, use MAMP if you have a mac) Go to www.wampserver.com/en Click Downloads Click DOWNLOAD Wamperver 2.0i Click the green Download now! button *Click run Wait for the file to download *Click allow Click next on the Wampserver setup wizard Accept the terms and click next Click next Click next Click install Choose your default browser (if you have more than one installed) *Click unblock Leave the SMTP as localhost and the email as you@yourdomain Clicknext Click launch now A small icon will appear on the right hand side of your taskbar (near the clock) it looks like a white bridge, left click this icon and click www.directory Copy and paste the your website folder into the directory. When its finished copying left click the bridge icon on your taskbar again and click Localhost Under the title Your projects you should see a link called whatever the name of your site folder was. Click this and (fingers crossed) the site will open. *depends on the security settings on your PC.
August 21, 200917 yr thanks guys, installed WAMP and got it working remarkably easiliy. Glad you got it working, happy coding.
Create an account or sign in to comment