Re: [PHP] can .inc run php script?

2001-01-29 Thread Shawn Blaylock

You have to set up the webserver to accept .inc files as php scripts.
The example you gave isn't actually running the function it's just
defining it.
If you include the .inc file in a .php file, it'll run whatever's in it
as if it were part of the php file. 

If you directly call the .inc file from the browser without setting up
the webserver properly, it'll output the source of the inc file.

If you set up the webserver to use the php parser on inc files, it'll
work fine.

If you include the .inc file in a .php file, it'll work fine.


John LYC wrote:
 
 hi all,
 
 can .inc file run scripts...
 
 example...
 
 //config.inc
 
 function watever()
 {
 //do something
 $var = something;
 return $var;
 }
 
 thanks
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] arg....

2001-01-26 Thread Shawn Blaylock

You might want to try this:

mysql_query("INSERT INTO links (count) VALUES ("$count") WHERE
lid=$id");


Kurth Bemis wrote:
 
 At 12:31 PM 1/26/2001, Krznaric Michael wrote:
 
 sorry - here you all go..
 
 // number crunching time
 $count++;
 $time = date("Y-m-d H:i:s");
 
 $result = mysql_query("INSERT INTO links (count) VALUES $count WHERE lid=$id");
 
 echo $result;
 
  You need to be a little more specific about DB and problem type.
 You may have to commit the transaction if commit is not implict (ex Oracle).
 There could be many resons including your SQL statement.
 
 Mike
 
 -Original Message-
 From: Kurth Bemis [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 26, 2001 12:23 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] arg
 
 
 i'm having a horrible time updating 2 fields in the same db.  I don't get
 an error but the fields aren't updatedcan anyone send me a snippet for
 the to learn from?
 
 ~kurth
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How does PHP accept multiple selection

2001-01-23 Thread Shawn Blaylock

It stores it in a 2D array. There's info on it on the FAQ.
here's the URL:
http://www.php.net/FAQ.php#7.14 


david klein wrote:
 
 Hello,
 
 I have some codes like:
   select name="links" size="5" multiple
   OPTION VALUE="scripttip1.html" Page 1
   OPTION VALUE="scripttip2.html" Page 2
   OPTION VALUE="scripttip3.html" Page 3
   /select
   input type="submit" name="removeButton" value="Remove"
 
 If I selected item 1 and item 3 both, how can I get my multiple selection in
 the PHP codes? (it seems to me it always give me the last selection only).
 
 Thank you very much in advance.
 
 Regards,
 David
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] but what if.. Function / String Problem

2001-01-19 Thread Shawn Blaylock

It won't work even with single quotes. It'll just echo out LoggedIn() as
part of the string.

"Boget, Chris" wrote:
 
  What if I want the function to be processed within the " "
  quotes?  Same as a variable might be interopelated?  IOW,
  can I call a function without concantenating the function
  together with the string?
  *being a little stubborn*
 
 No.  Why would you want to?
 You *might* be able to do it if you use single quotes instead,
 but I am unsure and personally doubt that it would work.
 
 Chris

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] but what if.. Function / String Problem

2001-01-19 Thread Shawn Blaylock

Yep. I think the only difference is the way it handles variable
interpolation, but I'm not entirely sure on that one.

"Boget, Chris" wrote:
 
  It won't work even with single quotes. It'll just echo out
  LoggedIn() as part of the string.
 
 Yeah, I didn't think so.  But I knew that '' behaves differently
 than "".  I just wasn't sure of the exact details of the differences.
 
 Chris

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] but what if.. Function / String Problem

2001-01-19 Thread Shawn Blaylock

O yeah! Thanks for pointing that out! =)

Ignacio Vazquez-Abrams wrote:
 
 On Fri, 19 Jan 2001, Shawn Blaylock wrote:
 
  Yep. I think the only difference is the way it handles variable
  interpolation, but I'm not entirely sure on that one.
 
  "Boget, Chris" wrote:
  
It won't work even with single quotes. It'll just echo out
LoggedIn() as part of the string.
  
   Yeah, I didn't think so.  But I knew that '' behaves differently
   than "".  I just wasn't sure of the exact details of the differences.
  
   Chris
 
 
 Single quotes also don't do escaping (i.e., "\n", "\r", etc.).
 
 --
 Ignacio Vazquez-Abrams  [EMAIL PROTECTED]
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] $PHP_SELF truncated to 17 chars

2001-01-18 Thread Shawn Blaylock

I'm having a problem with $PHP_SELF being cut down to 17 characters, for
instance 

/Scripts/php/phpscript.php?value=123
would be cut down to
/Scripts/php/phps

There was a bug opened up on bugs.php.net, id number 5380, but I can't
find a solution in the comments listed there. I was wondering if anyone
knew how to solve this problem?

I'm using the Zeus web server and PHP is set up as an ISAPI module.
Thanks!

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] ? PHP vs. ?

2001-01-18 Thread Shawn Blaylock

It's my understanding that whitespace is ignored. I could be wrong here,
though.

--Shawn

Toby Butzon wrote:
 
 Has using ?[space] instead of just ? as the short tag been discussed?
 
 --Toby
 
 - Original Message -
 From: [EMAIL PROTECTED]
 To: "Alexander Wagner" [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Thursday, January 18, 2001 4:21 PM
 Subject: Re: [PHP] ? PHP vs. ?
 
  On Thu, Jan 18, 2001 at 10:02:42PM +0100, Alexander Wagner wrote:
   [EMAIL PROTECTED] wrote:
? short open tag for PHP
?php  open tag for PHP
?xml  open tag for XML
   
And for all three cases the closing tag is ?.
  
   Wasn't there a thread on PHP-DEV about the PHP-parser mistaking ?xml
 for a
   short-Tag (for ?xml would be valid PHP like ?echo $var?).
  
   Got my point?
 
  No, there was a discussion if we should disable the short open tag (?)
 in
  php.ini by default. But that would break the most PHP scripts. But anyway
  you should use the always allowed long open tag for portable code and the
  benefit of it would be, you can mix PHP with XML. Another point is, if
 you
  move your scripts to a ISP who have disabled short open tags, your
 scripts
  wouldn't work anymore.  The normal open tag was discussed in 1997 and was
  choosen with XML in mind.
 
  -Egon
 
  --
  http://www.linuxtag.de/
  http://php.net/books.php
  http://www.concert-band.de/
  mailto:[EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] $PHP_SELF truncated to 17 chars

2001-01-18 Thread Shawn Blaylock

Unfortunately, it's hacking off the last few characters in SCRIPT_NAME,
too. 

--Shawn

jeremy brand wrote:
 
 I'm not aware of this bug, but temporarily you might consider using
 the $SCRIPT_NAME variable.  The same values is stored in it AFAIK.
 
 Jeremy
 
 Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
 http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
http://www.JEEP-FOR-SALE.com/ -- I need a buyer
   Get your own Free, Private email at http://www.smackdown.com/
 
 On Thu, 18 Jan 2001, Shawn Blaylock wrote:
 
  Date: Thu, 18 Jan 2001 15:03:39 -0800
  From: Shawn Blaylock [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: [PHP] $PHP_SELF truncated to 17 chars
 
  I'm having a problem with $PHP_SELF being cut down to 17 characters, for
  instance
 
  /Scripts/php/phpscript.php?value=123
  would be cut down to
  /Scripts/php/phps
 
  There was a bug opened up on bugs.php.net, id number 5380, but I can't
  find a solution in the comments listed there. I was wondering if anyone
  knew how to solve this problem?
 
  I'm using the Zeus web server and PHP is set up as an ISAPI module.
  Thanks!
 
  --
 
  Shawn Blaylock, ClipperNet Software Engineer
  [EMAIL PROTECTED]
  http://www.clipper.net/
  Eugene OR  541-431-3360 x406
  Toll Free  866-673-6260 x406
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] $PHP_SELF truncated to 17 chars

2001-01-18 Thread Shawn Blaylock

I've checked phpinfo(); and none of the other vars are truncated. I
think I just solved the problem! It's a crude hack though =( I set
$PHP_SELF = $HTTP_SERVER_VARS['PATH_INFO'] at the beginning of the
script, and that seems to have solved it. In the bug info they said it
might be related to the Zeus ISAPI, however, they didn't confirm nor
deny this, so I was still left hanging.

jeremy brand wrote:
 
 Then it is something else, not those variables themselves.  Do you
 have a configuration issue?  Are you running on Windows; do you need
 to reboot?
 
 check phpinfo(); and see if all your variables are truncated.
 
 Just a few thought.
 
 Jeremy
 
 Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
 http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
http://www.JEEP-FOR-SALE.com/ -- I need a buyer
   Get your own Free, Private email at http://www.smackdown.com/
 
 On Thu, 18 Jan 2001, Shawn Blaylock wrote:
 
  Date: Thu, 18 Jan 2001 15:19:37 -0800
  From: Shawn Blaylock [EMAIL PROTECTED]
  To: jeremy brand [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] $PHP_SELF truncated to 17 chars
 
  Unfortunately, it's hacking off the last few characters in SCRIPT_NAME,
  too.
 
  --Shawn
 
  jeremy brand wrote:
  
   I'm not aware of this bug, but temporarily you might consider using
   the $SCRIPT_NAME variable.  The same values is stored in it AFAIK.
  
   Jeremy
  
   Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
   http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  http://www.JEEP-FOR-SALE.com/ -- I need a buyer
 Get your own Free, Private email at http://www.smackdown.com/
  
   On Thu, 18 Jan 2001, Shawn Blaylock wrote:
  
Date: Thu, 18 Jan 2001 15:03:39 -0800
From: Shawn Blaylock [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] $PHP_SELF truncated to 17 chars
   
I'm having a problem with $PHP_SELF being cut down to 17 characters, for
instance
   
/Scripts/php/phpscript.php?value=123
would be cut down to
/Scripts/php/phps
   
There was a bug opened up on bugs.php.net, id number 5380, but I can't
find a solution in the comments listed there. I was wondering if anyone
knew how to solve this problem?
   
I'm using the Zeus web server and PHP is set up as an ISAPI module.
Thanks!
   
    --
   
Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
   
   
 
  --
 
  Shawn Blaylock, ClipperNet Software Engineer
  [EMAIL PROTECTED]
  http://www.clipper.net/
  Eugene OR  541-431-3360 x406
  Toll Free  866-673-6260 x406
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]