hi all,
is it possible to somehow have a function which takes a variable number
of arguments (with some kind of key association) which can then be
converted to variables?
i am sick of continually having to go back and add empty parameters to
functions in use.
an example would be..
function
ooops that should be...
function test2($arr)
{
extract($arr);
print $this;
}
test2($arr = array(
test = 1,
this = 2
));
// output
2
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
is it that your response page and the page processing the data are the same
page? i have had issues with this previously and had to use a 3 step
process -
1. address book form
2. processing script page
3. response page
--
Christian Haines
Internet Developer
MITOUSA.
Branding Strategies
maybe try...
print pre;
print_r($HTTP_POST_VARS);
print /pre;
this will dump the entire post var array to the browser.. similar to
functions before but faster.
Christian Haines
Internet Developer
MITOUSA.
Branding Strategies for Visual Interactive Design
102 Tynte Street
North
, christian haines wrote:
thanks rasmus,
i have tried read file but it gave me the same issues as fpassthru.. both cap
on the memory_limit directive withint the php.ini file
any other suggestions maybe?
cheers
christian
Rasmus Lerdorf wrote:
readfile()
On Fri, 4 Oct 2002
you could use the command file -bin your_filename and capture the output using popen
or exec.
i have found this to work well..
seee below
function mimetype($file)
{
// execute command
$fp = popen(file -bin $file,r);
// determine mimetype to output
if(!$fp)
{
// default
PHP Version 4.1.2
Red Hat Linux release 7.3 (Valhalla) (Kernel 2.4.18-3 on an i686)
Apache/1.3.23
Rasmus Lerdorf wrote:
Which OS and which PHP version?
On Fri, 4 Oct 2002, christian haines wrote:
this is what i have exactly in my code...
header(Content-Type: application/force
wrong then.
-Rasmus
On Fri, 4 Oct 2002, christian haines wrote:
thanks rasmus,
i have tried read file but it gave me the same issues as fpassthru.. both cap
on the memory_limit directive withint the php.ini file
any other suggestions maybe?
cheers
hi all,
i have successfully created a download script to force a user to
download, however attempting to download large files causes an error
saying that the file cannot be found.
my code
header(Cache-control: private);
header(Content-Type: application/force-download; name=\$file\);
thanks rasmus,
i have tried read file but it gave me the same issues as fpassthru.. both cap
on the memory_limit directive withint the php.ini file
any other suggestions maybe?
cheers
christian
Rasmus Lerdorf wrote:
readfile()
On Fri, 4 Oct 2002, christian haines wrote:
hi all,
i
hi all,
i have been looking around on the net for a relatively complete
mime-type listing (possibly showing extensions) but have not come across
anything.
does anyone know of such a list or where i could obtain one?
who looks after such a list might be a better question.
many thanks
christian
cheers for that...
that listing should do the trick
it was right under my nose as usual
also thanks for your reply in my other post
christian
Marek Kilimajer wrote:
I know about /etc/mime.types, does that help?
christian haines wrote:
hi all,
i have been looking around on the net
hi all,
i am having a problem with exec. every command i try to run returns 127
(seg fault i think) but no array with info.
what could be causing this problem?
i have tried running the complete path to the command e.g. usr/bin/ls -l
etc but with no luck.
could this be something to do with my
ok.. i found that i need to check the httpd error_log and it tells me that
it can't find the file or directory for the command.
how do i fix this?
i tried a full pathname to the command but it still says it cannot find dir
or file etc
c.
Christian Haines wrote:
hi all,
i am having
the ini_set function to turn safe mode off but this appears not
to work
suggestions would be great as this is driving me nuts!
cheers
c.
Christian Haines wrote:
ok.. i found that i need to check the httpd error_log and it tells me that
it can't find the file or directory for the command.
how do i
hi,
is it possible to have a function execute when a session expires using php4
sessions?
i know how to execute a function if i control the timeout (as mentioned
elsewhere in this group) but what about if the session times out itself
using the inbuilt garbage collection routine.
if so, any ideas
thanks john,
hmmm... i suspected as much...
i guess the way to do it would be to set a highly improbable garbage
collection and long timeout via ini_set. then use a timeout function
attached to the session which launches on expiration
cheers
christian
John Holmes [EMAIL PROTECTED] wrote in
the PHP board at Devshed and someone posted a
sample function to handle the cleanup.
---John Holmes...
-Original Message-
From: christian haines [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 11:06 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session and expiration
(sorry if this has been posted a thousand times..i am having problems
posting)
hi all,
how does one access and manipulate session variables from within a class?
i have hunted the net high and low but received no relief.
i have tried (where error is a session variable)
class test
{
var
hi all,
i have tried everything not to get a page to cache..
server-side:
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '. gmdate('D, d M Y H:i:s') .' GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache')
client-side:
meta
hi all,
i have just discovered a bug with internet explorer form submission.
suppose i have a form with 2 submit buttons to do different things eg-
form name=form method=post action=something.php
input type=submit name=update value=update
input type=submit name=delete value=delete
/form
one
sorry i just figured it out...just panicked...must be the time of year
if(!isset($delete))
{
// do update
}
if(isset($delete))
{
// do delete
}
that should fix the problem
From: [EMAIL PROTECTED] (Christian Haines)
Newsgroups: php.general
Date: Thu, 13 Sep 2001 23:44:30 +1030
hi all,
i am experiencing a bit of a problem with stripslashes stripping too much
data.
For example:
it will strip abc's - abc
has anyone else experienced this? is there a solution?
many thanks in advance,
christian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail:
hi all,
has anyone else had problems with specifying session_name causing data not
being input into session variables?
For example:
session_name(test);
session_start();
session_register(count);
count++;
causes count not to increment whereas
session_start();
session_register(count);
count++;
hi all,
PHP-4.03pl
LINUX 7.0
i am still having problems with sessions. the following does nothing but
should appear to do something! it is just a simple experiment to test that
sessions work. session_test.php calls session_proc.php to perform one of
three functions.
i would really appreciate
hi all,
any ideas why this does not work? its just a simple script to test
multi-dimensional arrays. the count value should increment...should it not?
many thanks in advance!
?
session_start();
session_register(count[0]);
$count[0]++;
echo $count[0].brnbsp;br;
reset
26 matches
Mail list logo