PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I'm trying to make part of my title custom, defined on each page of my site, with the other part displayed on every page.
So it will look like...
[b]Specific Page Title | Domain.com[/b]
but I can't seem to get it to work. Here is my current code on the main page...
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
webserver gets a request via http. It is configured to let php handle the request for a .php file. A new instance of php is created. This instance reads the source code from the .php file. The php instance processes the script. The output is sent to the client. When the script is done the php instance is removed.
require('http://domain/includes/header.php');
php sends a http request for /includes/header.php to the server domain via http. domain is configured to let php handle requests for .php file. A new instance of php is created. This instance reads the source code from the file includes/header.php. The new php instance processes the script. There's no TITLE defined in the new instance -> Site Title Not Set. The output is sent back to the client which is the php instance processing the require.