Posted by ZeldorBlat on 05/10/07 19:21
On May 10, 2:59 pm, SterLo <sterling.hamil...@gmail.com> wrote:
> If you define a variable $x and then INCLUDE a file such as
> include_once("path"); it should work.
>
> So if you have:
>
> $query = 'select * from list where content = '.$idcontent;
>
> And
>
> $idcontent = 15;
> require_once("queries.inc.php");
>
> You need to change require to include.
>
> so it should be
>
> $idcontent = 15;
> include_once("queries.inc.php");
>
> And you can check this by doing something like
>
> if ( $idcontent > 0 ) {
>
> }
Not true -- require and include behave identically in every way except
for what happens when the file cannot be included for some reason.
<http://www.php.net/require>
Navigation:
[Reply to this message]
|