|
Posted by ScareCrowe on 09/08/05 14:34
> It's probably not "include" instruction fault. It's the way the http
wrapper
> used works. I suppose it does it like this:
> It queries the URL for headers (HEAD method) to get the size or type
(etc.)
> of the document, which - in case of PHP files - causes execution of the
script,
> and then it queries the URL for output (GET method), which causes second
> execution of the script.
>
> You should not use "include" with URLs if they point to local PHP scripts.
> There's nothing better in using URLs in this case.
>
>
> Going back to the oryginal problem - did the doubled entries appear
> in the file one after another or there was one series of entries and
> another series of entries? The second case it suggests that the script
> is simply executed twice. Have you tried running the oryginal script
> from command line? Was the result doubled in this case too?
>
>
> Hilarion
At first I thought the script was running twice, but the script creates a
table and it is not repeated. What is doubled is the rows in the table. If I
use the full URL it creates the correct amount of rows, if not, I get each
row twice. It is the oddest thing I think I have come across with PHP.
--ScareCrowe
[Back to original message]
|