Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suggestions needed

Status
Not open for further replies.

MysticImages

Programmer
May 2, 2002
1
US
Hi Everyone,
I need alittle help on how to set a few pages up. I'm having a little problem with adding an require() in my php page. Here is how it is setup
ProductList.html calls ProductCall.php
Inside Productcall, I have several functions that are called from a Product.html page. and the Productcall also has a require statement
require("
Now, for some reason I'm getting a error message as follows:
Fatal error: Failed opening required ' (include_path='') in / on line 21

The only code in the productcall.php is:
#!/usr/local/bin/php

<?php

function writeDescrip()
{
echo(str_replace('+', ' ', $descrip));
}

function writeImageSource()
{
echo (&quot;<img src=$bpic width='343'
height='252'>&quot;);
}

function writeItemPrice()
{
echo(&quot;Item#: &quot; + $Item_number);
echo(&quot;<br>&quot;);
echo(&quot;Price: &quot; + $amount);
}

require(&quot;?>

It appears as though the error is refering to the require statment. Is there something wrong with this statement? Also, Can I use the require or include functions to pass variables to the included page, or are all the variables availiable already because they where passed to the productcall.php file? Thanks for any help.
Michael
 
or use require('productcall.php');

//note single quotes,
ensure that this file is in the root (/) dir of your website, or path directly to it e.g. if its in a directory named &quot;required&quot;,

require('/required/productcall.php'); ***************************************
Party on, dudes!
[cannon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top