Re: Simple question
| From: | Richard Quadling | Date: | Mon, 09 May 2011 13:24:50 +0000 |
| Subject: | Re: Simple question | ||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-10976@lists.php.net to get a copy of this message | ||
On 9 May 2011 13:48, Vincent McGinley <vmcginley@re-thinkitinc.com> wrote:
> Hello I have one line of php code that would switch out information on a
> webpage.
>
> <?php @ require_once ("folder/$Product.php"); ?>
>
> This would pull in a div with an image and paragraph (the file would be
> located within the same folder or subfolder). This simple code worked fine
> until we upgraded to PHP5. Is there a slight tweak that needs to be done to
> the code to get it to work again?
>
> Any help would be greatly appreciated.
>
Can you remove the @.
Do you get an error?
Can you change the location to "./folder/$Product.php" ?
Does it now work?
Does the file actually exist?
Is the included file a PHP file?
If the file is required_once, it can only be used once. Is that the issue?
include may be a better option here.
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY