 |

Lionel
User
Nov 3, 2002, 3:30 PM
Post #1 of 5
(2657 views)
Shortcut
|
Why would <?php chdir ("/var/www/magazine/"); include ("news.php"); ?> work just fine in cat_index.php and the same (I just copy and pasted template, simply replacing path), adding some operators will not? <?php chdir ("/var/www/magazine/"); include ("news.php?channel=Search&feed=Whatever"); ?> Both work fine with SSI
|
|
|  |
 |

Dave
Staff
/ Moderator

Nov 4, 2002, 5:11 PM
Post #2 of 5
(2640 views)
Shortcut
|
I don't know much about PHP, but it could be that it's including the file from the filesystem and when you enter ?query on the end it looks for a file like that and can't find one. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

Lionel
User
Nov 4, 2002, 6:36 PM
Post #3 of 5
(2636 views)
Shortcut
|
No, that's not the case, because the same include works as a SSI, or thru the browser, so the file exists. Thanks anyway.
|
|
|  |
 |

Dave
Staff
/ Moderator

Nov 4, 2002, 7:11 PM
Post #4 of 5
(2635 views)
Shortcut
|
Maybe "news.php" exists but there is no file called "news.php?channel=Search&feed=Whatever". There's a difference between accessing things though your web server and accessing them straight from the file system. The docs for the include function are here: http://www.php.net/manual/en/function.include.php It sounds like it takes URLs, that's what you want to do. The docs actually mention your exact situation: // Won't work; looks for a file named 'file.php?foo=1&bar=2' on the // local filesystem. include 'file.php?foo=1&bar=2'; // Works. include 'http://www.example.com/file.php?foo=1&bar=2'; Hope that helps. : ) Dave Edis - Senior Developer interactivetools.com
(This post was edited by Dave on Nov 4, 2002, 7:14 PM)
|
|
|  |
 |

Lionel
User
Nov 4, 2002, 7:20 PM
Post #5 of 5
(2631 views)
Shortcut
|
Indeed that works! And you claimed not knowing much about PHP? You little modest guy! As usual, you guys are most helpful. Thanks a million.
|
|
|  |
|