Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 04-20-2007, 02:46 AM   #1 (permalink)
markster
Code Monkey
 
markster's Avatar
 
Join Date: Jun 2006
Posts: 65
markster is on a distinguished road
Question Variables not accessable via include()

At the top of every page I incldue the design file to make edits easier. I have now started having a different page title for each page so I'm using this code:

Top of a Page:
PHP Code:
<?php
$page_title 
"Frequently Asked Questions";
include(
"http://www.stuff4web.co.uk/design.php");
?>
Top of design.php:
PHP Code:
<?php
if (isset($page_title)) {
    
$title $page_title." - Stuff4Web.co.uk";
} else {
    
$title "PHP Scripts, Java Scripts, Flash Movies and Stock Photos - All affordable at Stuff4Web";
}
require_once(
"mysql_connect.php");
session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>

<title><?php echo($title); ?></title>
As you can see I have a default title in place incase I didn't specify a title for a certain page. My problem is that I always get the default title, not the one I specify, look: Click Me

What an doing wrong?

Thanks
markster is offline   Reply With Quote
Old 04-20-2007, 03:50 AM   #2 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 676
DJMaze is on a distinguished road
You are selling PHP scripts on that website and have no clue how PHP works.
That's just awfull.

Your bug is here:
PHP Code:
include("http://www.stuff4web.co.uk/design.php"); 
1. Open your php.ini
2. find 'allow_url_fopen' and optionaly 'allow_url_include'
3. set them to off
4. reboot http daemon
5. good luck with fixing all your scripts
6. if fixing fails ask a question
__________________

UT: Ultra-kill... God like!
DJMaze is offline   Reply With Quote
Old 04-22-2007, 07:38 AM   #3 (permalink)
markster
Code Monkey
 
markster's Avatar
 
Join Date: Jun 2006
Posts: 65
markster is on a distinguished road
I already tried that to no avail. Never mind, I've worked arround it
markster is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for C++ ID3 library Anakashar Platform/API C++ 19 10-15-2006 09:10 AM
.h files needed Maani Standard C, C++ 7 02-02-2005 04:59 AM
Linking between include files buchannon MS Technologies ( ASP, VB, C#, .NET ) 2 11-10-2004 11:35 AM
jsp include sde Java 6 08-19-2004 06:47 AM


All times are GMT -8. The time now is 09:11 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting