$base_url

I apologize to the forum gods that I may have annoyed by asking more than one question within my other thread. I suppose this is an entirely separate question, and as such, it now has its own thread.

I cannot find a tutorial or any information on how to properly build, and implement a $base_url so that I can more readily use a multi-level hierarchy on my site.

If someone could explain this to me, I would be greatly appreciative.

Ok, thanks to Noodles for explaining how it would look on each page:

[php]include_once ($base_url . ‘script/header.php’);[/php]

But It doesn’t seem to work for me, and now I have gone and broken everything? Lol, what a clusterpuck.

Now I am at my index.php, which is located in my root.

[php]<?php
$subtitle = “Home”;
$base_url = ‘domain.com/’;
include_once ($base_url . ‘scripts/header.php’);
?>
[/php]

and I am getting:


Warning: include_once(alexrowsell.com/scripts/header.php) [function.include-once]: failed to open stream: No such file or directory in /home/alexrows/public_html/index.php on line 5

Help? :’(

don’t use your domain use your path

$baseurl = “/home/alexrows/public_html/”;

Sponsor our Newsletter | Privacy Policy | Terms of Service