PDA

View Full Version : PHP require on website not working correctly




Remnantique
Jun 25, 2011, 10:43 AM
Hi, i followed alot of tutorials on how to set up php on my website so i can update multiple pages at once with the whole PHP require business but as you can see on my website [ www.uniteapex.com ] it literally shows this:

<html>
<head><title>Lost in the World</title>

<link rel="stylesheet" href="/style.css" type="text/css">
</head><body>

<div id="banner">

<!-- Site Title -->

<div id="sitename">
Lost in the World
</div>

<div id="side">

<!-- Navigation -->

<?php require("/includes/navigation.html"); ?>

<!-- End -->


</div>


<div id="content">

<!-- Content -->

<?php require("/includes/content.html"); ?>

<!-- End -->

</div>

</div>
</div>
</body>
</html>

I've probably just not understood the instructions properly, i currently have an index file, php files for the content that needs to be updated [ navigation and content ] and a CSS file. I read somewhere that if you have CSS file you can just update the CSS file but i don't know which bits to change, i'm experimented myself and not much luck.

If anyone has msn i can add you on there and send you all the files, index, navigation, content, css and images and see if you can get it to work. I'm using a custom layout so i'm trying to modify it.



angelwatt
Jun 25, 2011, 12:08 PM
From the looks of it, your web server isn't processing the PHP. Are you certain they support PHP? The web server also doesn't seem to be setup to use index.php and the directory index (http://httpd.apache.org/docs/2.0/mod/mod_dir.html). You can add this to a .htaccess, but you need to find out if your web server supports PHP first, because currently it doesn't look like the do.

Remnantique
Jun 25, 2011, 04:35 PM
Ah i see, it's Webs, yea i suspected they didn't support php as it was offering a premium sale to upgrade to an account on a different provider which supports php. Only problem is it costs = S

Also what's a .htaccess? And the directory index? I don't understand..How do i go about setting up a Directory Index?

Thanks for responding btw!

Macsavvytech
Jun 26, 2011, 07:44 AM
Ah i see, it's Webs, yea i suspected they didn't support php as it was offering a premium sale to upgrade to an account on a different provider which supports php. Only problem is it costs = S

Also what's a .htaccess? And the directory index? I don't understand..How do i go about setting up a Directory Index?

Thanks for responding btw!

Most hosts offer php for free, odd anyway.

the .htaccess is a file on an apache web server to create it just make a file named .htaccess and search what you can put in it. The directory index is just the root of your website so if your main page is website/ put it in website/ not website/teachers or something.

Remnantique
Jun 26, 2011, 01:36 PM
This is such a scam, you have to go to Webs partners Network Solutions and then you have to PAY again for a website you don't even need just to get php, there's no point being with Webs at all but i'm paying for it and don't want to move over right now.