RE: [PHP] include question

2002-12-12 Thread Ronald Clark
Thanks!  Works perfect with double quotes!

RC


-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 12, 2002 8:21 AM
To: Ronald Clark
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] include question


Hi,

Friday, December 13, 2002, 12:07:05 AM, you wrote:
R Hello all,

R I am passing a variable like so:
R a href=link.php?foo=bar.php

R On the link.php page, I have this simple code:
R ?php
R $job = $_GET['foo'];
R echo $job;   // for error checking
R include 'path/to/$job';
?

R The 'echo $job;' statement works just fine, but the outbout for the 
R include statement looks like this: bar.php
R Warning: Failed opening 'scripts/$job' for inclusion
R (include_path='.:/usr/local/lib/php') in
/usr/local/www/data-dist/link.php
R on line 142

R Can I not use a $variable in an include 'something.php '; statement?

R Thanks in advance,
R Ron Clark


You have to use double quotes like:
include path/to/$job

or add like this:

include 'path/to/'.$job

-- 
regards,
Tom


CONFIDENTIALITY NOTICE:



The information contained in this ELECTRONIC MAIL transmission
is confidential.  It may also be privileged work product or proprietary
information. This information is intended for the exclusive use of the
addressee(s).  If you are not the intended recipient, you are hereby
notified that any use, disclosure, dissemination, distribution [other
than to the addressee(s)], copying or taking of any action because
of this information is strictly prohibited.





RE: [PHP] Can PHP do this...?

2002-12-11 Thread Ronald Clark
John, PHP-general,

OK. I think I understand this, but let me ask just to be sure.

So if I setup in my page something to this effect:
if ($_SERVER['!HTTPS']) {
echo Switching over to SSL...;
echo META redirect to SSL;
} else {
echo **Rest of Page**;
}

Would this work? I am about to add a secind site to my site using an alias
in Apache. Example is http://www.mysite.com for first site and
http://www.mysite.com/2ndsite. Except I want everything for the second site
to be https. Make sense?

Thanks again,
Ron Clark


-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 11, 2002 11:45 AM
To: Ronald Clark; [EMAIL PROTECTED]
Subject: RE: [PHP] Can PHP do this...?


 Hello all. I have a question that I hope someone can answer. Is it 
 possible to determine is someone is hitting your site over SSL or 
 plain http
using
 PHP? If so, is it part of getenv()?

I think it's $_SERVER['HTTPS']. If that is set, then the connection is over
SSL.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/




CONFIDENTIALITY NOTICE:



The information contained in this ELECTRONIC MAIL transmission
is confidential.  It may also be privileged work product or proprietary
information. This information is intended for the exclusive use of the
addressee(s).  If you are not the intended recipient, you are hereby
notified that any use, disclosure, dissemination, distribution [other
than to the addressee(s)], copying or taking of any action because
of this information is strictly prohibited.