[PHP] Having trouble executing unzip from PHP script

2001-04-23 Thread Dexter

Hi PHP ers,

Cant unzip a file from a PHP script. It does nothing.

It works on the command line. Added paths to both the zip file and unzip program 
nothing happens 

exec("/usr/bin/unzip  $IMAGE_TEMP_DIR/phpxXTN3T ");

Thanks

Dexter





[PHP] Precedence question- cookie value over form value?

2001-04-24 Thread Dexter

Hi PHPers,

If I have a script that checks to see if a variaable is defined. The variaable is from 
a form and is sent to the script. There is also a cookie that may be set with a name 
as the same name as from the form. When the script checks and assuming the cookie is 
set and a value sent from the form , which value does the variable take on?

Thanks

Dexter




[PHP] Globalness of variables? Functions & subs

2001-04-24 Thread Dexter

Hi PHPers,


I noticed that you have to use keyword "global" in front of globla var.- (one declared 
at the top of a  script outside any functions ) in order to access it inside a 
function. So merely designating a var. global is a little more involved than say Perl 
or other languages. You actually have to tell PHP that the function is global.

I see functions , are there subroutine calls. I guess not. A function acts as a 
sub when it returns no value . A sub that returns a value is a function.


Thanks

Dexter





[PHP] How to chop off a char off end?

2001-04-27 Thread Dexter

Using Perl , I usually say

$string=~s /,$//;

to chop off a particualr char on end.

How do you do this using PHP.

Thanks,

Dexter




[PHP] How to read a web page and analyze but not display it

2001-05-08 Thread Dexter

hi PHP 'sters,

How to read a web page and analyze but not display it using PHP.



Thanks

Dexter. 




[PHP] Is there a string index funct?

2001-05-09 Thread Dexter

Hi PHP sters,

Looking for a function like Perls index function to get the first occurrence of a 
string within another.

Thanks

Dexter




[PHP] Does the array parameter of ereg actually return strings matched?

2001-05-09 Thread Dexter

Does the array parameter of ereg actually return strings matched? I tried to read a 
file looking for a string using

ereg and wanted to put the matched strings found in an array. Doesn't seem to

be happening with the following.



 $contents=fread($readfile,10);

 $pattern="";
$i=0;
  while(!feof($readfile))
   {

 $contents=fgets($readfile,4065);

if(eregi($pattern,$contents,$regs))
 {   echo "$regs[$i]";
  }
 $i++;
    }


Thanks

Dexter

Dexter