Re: [PHP] Checking for http://
- From: dmjoseph@xxxxxxxxx ("Dan Joseph")
- Date: Fri, 29 Aug 2008 11:33:30 -0400
On Fri, Aug 29, 2008 at 11:25 AM, Ron Piggott <ron.php@xxxxxxxxxxxxxxxxxx>wrote:
How do I check if http:// is at the beginning of $web_site and if itYou could use substr() (www.php.net/substr)
isn't add it? Ron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
if ( substr( $web_site, 0, 7 ) != "http://" )
{
$web_site = "http://" . $web_site;
}
--
-Dan Joseph
www.canishosting.com - Plans start @ $1.99/month.
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."
- References:
- Checking for http://
- From: Ron Piggott
- Checking for http://
- Prev by Date: Debugging PHP scripts
- Next by Date: Re: [PHP] ASCII Captcha
- Previous by thread: Checking for http://
- Next by thread: Debugging PHP scripts
- Index(es):
Relevant Pages
|