[PHP] Variable name assembly

2002-04-19 Thread Jason Lam

How do I assemble strings to become a variable?

These code do not work...
$abc = 10;
echo $('ab'.'c');





[PHP] Array Question

2002-04-18 Thread Jason Lam

$arr2 is a 2d array.

$arr1[0] = 1;
$arr1[1] = 10;
$arr2[0] = $arr1;
print $arr2[0][1];

Result will be 10

But,

$arr1[0] = 1;
$arr1[1] = 10;
$arr2[0] = $arr1;
$arr3 = each($arr2);
print $arr3[1];

Result is not 10. So, function "each" is not taking the whole $arr2[0]
out..

My question is what function should I use to iterate array elements (with
arrays in it)?

Jay


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




[PHP] Mac IE 5.0 upload problem

2001-05-18 Thread Jason Lam

Would any Mac expert help me out with this one.

I have created an upload script with works fine for PC file and Mac files
with IE 4.5, but it just would not work with IE5.0

Whenever I upload file with IE 5.0, after it gets to the server, the size
becomes smaller by few hundred bytes, this ruin the file. If I download the
file to a mac again, it becomes a white icon and cannot be opened. The
$file_type tells me that it is "application/octet-stream". But on the other
hand, doing the same thing on IE 4.5 will make the filesize larger by a few
hundred bytes when it arrive at the server (I think the resource fork is
included) and the upload file type is "application/x-macbinary". Anyone know
how come IE5.0 seems to lost those bytes? Is it losing the resource fork? Do
I have any control over what the browser will upload? BTW, I was testing
with some Quark Express file.

Any help is appreciated.

Jason Lam




-- 
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] Macbinary? How to deal with it?

2001-05-14 Thread Jason Lam

I am having a lot of trouble with letting user upload files and download
again (target group - mac user). I tried with many application files that
does not work (executable in PC terms). Everytime I upload this kind of
files, it will become corrupted, the content type of the upload is
application/x-macbinary. Is this the right type?

I have tried to make some self extracting file with stuffit (MacOS format,
filename.sea) then upload it. FTPing it back down, the file is already
corrupted, however just normal FTP won't corrupt the file, I am assuming
something has to do with handle of the uploaded file.

Can anyone provide some hints as to how to properly handle these mac files?

Jason Lam


-- 
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] Any plans on fixing performance of file Upload?

2001-05-02 Thread Jason Lam


I am wondering if there are any plans to fix the file upload performance problem. 

Try uploading a 200M file by post to a PHP script, you'll notice how slow it is. Even 
having enough RAM doesn't seems to help very much.



Jason Lam



[PHP] Question on installation

2001-04-23 Thread Jason Lam

I have installed the RPM version of PHP that came with a Linux dist. Obviously, it 
didn't came with a lot of the goodies, like ODBC. Now, if I have to install those 
modules, is there anyway I can "JUST" compile those modules and install it with 
/etc/php.ini ? 

Is this a recommended way? Or should I just re-compile everything? That will really 
defeat the purpose of a packaging system

Jason Lam



[PHP] Output graphic or other download file to client's browser

2001-04-20 Thread Jason Lam

Hello!

I am trying to develop a web site where some files and images are private, I am using 
session to auth. user. 

I would like to know how I can send some local files to the client so that others 
without the access to the web site will not be able to download. 

How would I stream the local image (jpg) files over to client? I know how to stream it 
the normal way, just don't know how I can stream it to some and not others.

Anyone have suggestions on this one?

Jason Lam



[PHP] Session Problem (Design problem!?)

2001-03-28 Thread Jason Lam

I got this strange problem, maybe a design flaw, please look at it and tell
me what's wrong.

3 files in total

1.php3
--








--

2.php3
--


GO";
?>

---

3.php3
---






When I goto 1.php3 and type in something in the text field, then goto 2.php3
and click go, it automatically goto 3.php3 with data that I type in 1.php3.
The problem starts when I click BACK button on the browser to 1.php3 and
type in another data and click the button on the form again, but here is the
trouble. I seems to be getting the data I type in First, not the current
one. By using phpinfo(), I cannot find the data are all up to date, I wonder
how this data still ends up sitting there.

Can anyone tell me what's going on?

BTW, going back once again with the second set of data and proceed to 2.php3
seems fine. Could it be cache of browser?




-- 
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]