Welcome to WebmasterWorld Guest from 54.221.54.252

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP ready?

     
2:42 pm on Jul 31, 2001 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 16, 2001
posts:585
votes: 0


How can you tell if your site will handle php?

I tried <?php echo $HTTP_USER_AGENT; ?>
but I didn't get an "answer" just the string <?php echo $HTTP_USER_AGENT; ?>

2:50 pm on July 31, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 6, 2000
posts:904
votes: 0


If you had this in a file.php then it shows that your site isn't set up for PHP :(
3:31 pm on July 31, 2001 (gmt 0)

Preferred Member

10+ Year Member

joined:May 9, 2001
posts:416
votes: 0


Try this:

<?
$browser = getenv("HTTP_USER_AGENT");
if ($browser) {
echo ("Browser: $browser\n");
} else {
echo ("Sorry, no can do!");
}
?>

Of course if PHP is not available you won't get the "no can do line" anyway but,...
Why not just ask your ISP? ;)

3:39 pm on July 31, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 6, 2000
posts:904
votes: 0


If the host hasn't set the server up for PHP, it's 99% certain that any files with a .php extension would be treated as text files - ie the <?php echo $HTTP_USER_AGENT; ?> will actually be output by your browser as plain text.
3:43 pm on July 31, 2001 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 16, 2001
posts:585
votes: 0


Thanks, guess they don't have it set up for php because when I go to the page, it tries to download itself.

: (

4:13 pm on July 31, 2001 (gmt 0)

Preferred Member

10+ Year Member

joined:May 9, 2001
posts:416
votes: 0


You might try, as one last test, a .php extension, then again with a .php3 extension. Version 4.x accepts the former; version 3.x the latter.
4:13 pm on July 31, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 25, 2000
posts:1786
votes: 0


chmod the file to 666 and it should work.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members