Oops ... That's not balanced. Add another ) at the end of the if.
/bsh/
Billy S Halsey wrote:
> Try an extra layer of parens:
>
> if (($fp = fopen("http://www.anyurl.com";, "r") == NULL)
> {
> echo "not valid";
> }
> else
> {
> echo "this is a valid url";
> }
>
>
> Roberts, Mark wrote
Try an extra layer of parens:
if (($fp = fopen("http://www.anyurl.com";, "r") == NULL)
{
echo "not valid";
}
else
{
echo "this is a valid url";
}
Roberts, Mark wrote:
> I am using the following to verify a url:
>
> if (!$fp = fopen("http://www.anyurl.com";, "r"))
> {
> ec
I am using the following to verify a url:
if (!$fp = fopen("http://www.anyurl.com";, "r"))
{
echo "not valid";
}
else
{
echo "this is a valid url";
}
I always get a not valid message. What am I doing wrong? Is there a better
way to do this?
Mark Roberts
Sr. Systems Analyst
LanAp
3 matches
Mail list logo