|
Posted by PHPeter on 09/29/35 11:22
Hello DXTrim
I am working with a colleague who may well write the 'detailed information
pages' (DIPs) on web pages on his computer whilst my searchable index is
kept on my computer. (I know this sounds a bit daft but there are politics,
ownership and cgi issues to be resolved!)
So if the DIPs were on his PC then I would access them from the 'More' link
as a typical URL.
If commonsense prevails, the DIPs would be on my website so it would be
perhaps just a question of opening an htm file.
Now I am very new to PHP and I was casting around for a method to check the
existence of a file. I was thinking of using the fopen function - something
like
$openfile = fopen($filename, 'r');
if (!$openfile) {
... suppress the 'More' link ...
}
unlink($filename);
I have included the 'unlink' to close the file because this code would be
actioned repeatedly by the loop which generates the table.
But I could not get this to work.
Any ideas - most welcome
"DXTrim" <dXtrim@nospam.no> wrote in message
news:42e755f2$0$3372$ba620e4c@news.skynet.be...
> Hello PHPeter,
>
> Could you be more explicit? Are you using a data base or the "More" is
> pointing to a file? If it is pointing to a file you could check if the
> file
> exists to display the "more".
>
> DXTrim
>
>
>
>
>
> "PHPeter" <me@privacy.net> wrote in message
> news:42e752e5$0$24474$ed2619ec@ptn-nntp-reader03.plus.net...
>> I wonder if someone can help me?
>>
>> I have a table of records - in fact it is an index. Each record has a
> 'More'
>> hyperlink which is supposed to take you to a more detailed information
>> page - one for each entry.
>>
>> The 'More' hyperlink is displayed on the fly as the table is being
>> displayed. It is going to take me some time to complete each detailed
>> information page so I would like to have the 'More' hyperlink displayed
> only
>> when a valid page has been written.
>>
>> Is there a way of detecting a missing URL to the detailed page so I can
>> suppress the corresponding 'More' link?. This would avoid the 'Page Not
>> Found' warning.
>>
>>
>>
>
>
Navigation:
[Reply to this message]
|