Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

php include

Featured Replies

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.

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

Yes, you need a web server running on your local system.

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.

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.