[PHP] Can I pass the ftp transfer mode in a string?

2002-09-30 Thread John Kelly
Can I pass the ftp transfer mode in a string like ... $filetype = FTP_ASCII; $upload = ftp_fput($conid, $dfile, $sfile, $filetype); I ask as when I do I get the following error message ... Warning: ftp_fput() expects parameter 4 to be long, string given If I replace $filetype with the text

[PHP] Re: Can I pass the ftp transfer mode in a string?

2002-09-30 Thread John Kelly
Thanks guys, I was unaware having quotes around it would make a difference. Works fine once I removed the quotes. John Kelly wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Can I pass the ftp transfer mode in a string like ... $filetype = FTP_ASCII; $upload = ftp_fpu

[PHP] Confusing array question ...

2002-09-10 Thread John Kelly
Hi, I have 1 primary array called $item containing 20 values each of whose value is part of the name of 20 other arrays containing various number of values. How can I cycle through the primary $item array using a foreach and within that do a for on each of the 20 secondary arrays dynamically

Re: [PHP] Confusing array question ...

2002-09-10 Thread John Kelly
Thanks that did it! Martin Towell [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Try adding curly braces around the var name, like this: for($i=0; $icount(${beginning . $value . end}); $i++) { -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Confusing array question ...

2002-09-10 Thread John Kelly
Thanks for the examples Zak! I got it working. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Need help accessing the values of an array in a form ...

2002-05-22 Thread John Kelly
Hi, I have a form using the post method that outputs a dynamic number of fields each time with the same name but different values - this is required. For example ... filename[] filename[] filename[] filename[] On the next page I try to access the array using ... for($i=0; $icount($filename);

[PHP] Re: Need help accessing the values of an array in a form ...

2002-05-22 Thread John Kelly
John Kelly [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I have a form using the post method that outputs a dynamic number of fields each time with the same name but different values - this is required. For example ... filename[] filename[]

[PHP] Re: Need help accessing the values of an array in a form ...

2002-05-22 Thread John Kelly
John Kelly [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... John Kelly [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I have a form using the post method that outputs a dynamic number of fields each time wi

[PHP] How do I check if a remote file exists?

2002-04-16 Thread John Kelly
How do I check if a remote file exists that is in a directory protected by an .htaccess file? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How do I check if a remote file exists?

2002-04-16 Thread John Kelly
John Kelly [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... How do I check if a remote file exists that is in a directory protected by an .htaccess file? I should have added that this is the code I have tried without success ... $url = www.domain.co

[PHP] How can I change directories after fsockopen?

2002-04-16 Thread John Kelly
I have multiple domains hosted on a server. When I fsockopen to one of them I end up in the document root of another one. Is there a way to specify the directory one ends up in after establishing an fsockopen connection OR issuing a command via fput to CD to a different system path after

[PHP] How do I overwrite file via FTP without changing owner/group?

2002-04-15 Thread John Kelly
Hi, I am using the example code at php.net to FTP a file to a remote server. I am trying to overwrite an existing file, but want to maintain the owner/group of the file being overwritten but it keeps giving the overwritten file the owner/group name of the userid that I am loggin in via FTP with.

[PHP] Stripslashes addslashes question ...

2002-03-22 Thread John Kelly
Hi, can someone tell me why the following results in evaluated variables with 2 slashes in front of apostrophys instead of one and how I can modify it to only add 1? Thanks! foreach($_POST as $k=$v){ if (get_magic_quotes_gpc()){ $_POST[$k] = stripslashes($v); } $_POST[$k] = addslashes($v); eval(