importing php funtions

The geek forum. PHP, Perl, HTML, hardware questions etc.. it's all in here. Got a techie question? We'll sort you out. Ask your questions or post a link to your own site here!

importing php funtions

Postby Mr. Rogers » Tue Mar 21, 2006 8:02 am

is it possible to call a php function by linking it from another file?

for example:

index.html
page_header(); <- from functions.php


functions.php
print<<<_HTML_
<div id='header'>
header here
</div>
User avatar
Mr. Rogers
 
Posts: 1512
Joined: Sat Sep 06, 2003 10:23 pm
Location: Chicago, IL

Postby Mithrandir » Tue Mar 21, 2006 6:06 pm

You should be able to do something like this:

Code: Select all
include('functions.php');
page_header();
User avatar
Mithrandir
 
Posts: 11071
Joined: Fri Jun 27, 2003 12:00 pm
Location: You will be baked. And then there will be cake.

Postby Mr. Rogers » Tue Mar 21, 2006 7:25 pm

alright, thanks. i'll try it
User avatar
Mr. Rogers
 
Posts: 1512
Joined: Sat Sep 06, 2003 10:23 pm
Location: Chicago, IL


Return to Computing and Links

Who is online

Users browsing this forum: No registered users and 76 guests