Re: Detection of missing links
- From: "PHPeter" <me@xxxxxxxxxxx>
- Date: Wed, 27 Jul 2005 13:50:35 +0100
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@xxxxxxxxx> wrote in message
news:42e755f2$0$3372$ba620e4c@xxxxxxxxxxxxxxxxx
> 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@xxxxxxxxxxx> wrote in message
> news:42e752e5$0$24474$ed2619ec@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> 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.
>>
>>
>>
>
>
.
- Follow-Ups:
- Re: Detection of missing links
- From: Veikko Mäkinen
- Re: Detection of missing links
- References:
- Detection of missing links
- From: PHPeter
- Re: Detection of missing links
- From: DXTrim
- Detection of missing links
- Prev by Date: Re: form problem (?)
- Next by Date: Re: Detection of missing links
- Previous by thread: Re: Detection of missing links
- Next by thread: Re: Detection of missing links
- Index(es):
Relevant Pages
|