[PHP] file_get_contents source??

2002-04-19 Thread Giovanni Lenzi

file_get_contents function is supposed to return the contents of a file in a
binary safe manner. I tried it on two different servers which has different
versions of APACHE+PHP but it still not works.
The server give me this response:

Fatal error: Call to undefined function: file_get_contents() in
/usr/home/s/a/sauzer/public_html/sfidario/readstreams/1.0/warsupcoming.php
on line 17

Surely i have to update PHP version but i can't do it onto the remote
server.
So i have to create myself this function.

Can anyone help me please??
Does anyone have the full source code of this function??



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] R: file_get_contents source??

2002-04-19 Thread Giovanni Lenzi

thanks very much.
now i'll read the entire article.
However my problem is that i want to transmit characters like :
£ $ %  ^ § so file and readfile function don't work correctly.

Can you say me something more??



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] R: file_get_contents source??

2002-04-19 Thread Giovanni Lenzi

ok thanks,
i solved my problem.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] dynamic array in objects??

2002-04-16 Thread Giovanni Lenzi

How can i build a dynamic array as a member of a class??
I have the class SELECT and i want its attribute VALUES to be set like an
array.
It is possible??
Array would be built in the constructor of the class.
This is my example:

class Select
{
 //  ~ options separator^ value-description
separator

 var $values;
 var $descs;

function Select($list=)
 {
  echo $list.br;
  $options = explode(~,$list);
  for($i=0; $icount($options); $i++)
  {
   $splitted = explode(^,$options[$i]);
   echo $splitted[0].-.$splitted[1].br;
   $this-$values[$i] = $splitted[0];
   $this-$descs[$i] = $splitted[1];
   echo $this-$values[$i].-.$this-$descs[$i].brbr;
  }

 }

 $sel = new Select(pera^PERA~banana^BANANA~mela^MELA);


i run the script and the result is:
pera^PERA~banana^BANANA~mela^MELA
pera-PERA
PERA-PERA

banana-BANANA
BANANA-BANANA

mela-MELA
MELA-MELA

... while i am expecting:

pera^PERA~banana^BANANA~mela^MELA
pera-PERA
pera-PERA

banana-BANANA
banana-BANANA

mela-MELA
mela-MELA


can you help me please??



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] R: [PHP] getting at the server environment variables

2002-04-02 Thread Giovanni Lenzi

make a php file and fille it with
?
phpinfo();
?
save the file
run it
and look at all php and apache global variables.

Unknown Sender [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]
 Andreas Pour wrote:

  Hi,
 
  Have all server requests for domain.org point to this php script:
 
  ?
  header(Location:  . ereg_replace(domain.org, domain.net,
  $BASE_URL));
  ?

 Andreas,

 Great idea, but it doesn't work.  The $BASE_URL is empty.  Looking at a
 PHP book I have, it appears that I should be using the HTTP_HOST server
 environment variable, but being brand new to PHP, I have no clue how to
 get at the variable.  Can you enlighten me?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] including file hosted by www.a.com on www.b.com

2002-04-02 Thread Giovanni Lenzi

I'm in trouble with include procedure.
I have a file on host http://www.a.com that must be included by the file on
the host http://www.b.com
The code of the file to be included is as follows:

included.php on http://www.a.com
?
$vett[0] = zero;
$vett[1] = one;
$vett[2] = two;
return $vett;
?

The code of the file which must include first file is as follows:

master.php on http://www.b.com
?
$value = include('http://www.a.com/included.php');
echo $value;
echo $value[0];
echo $value[1];
echo $value[2];
?

The expected output would be:
Arrayzeroonetwo
but the include procedure doesn't work correctly working on different host.

Can anyone help me please??
I'm in a very big trouble.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php