Re: [PHP] Re: help with end of line charater
Hello Adam! $list2 = explode(\n, $list); // \n not \r\n $list = implode(\r\n, $list2); foreach ... - not need with the best regards - Konstantin Kurilov Shawn McKenzie wrote: Adam Williams wrote: I have staff inputting email addresses into a textarea named $list on a form and when they click submit, my php script sorts the email addresses and writes to disk. The problem is, lets say they enter the email addresses b...@mdah.state.ms.usstaff hits enter ama...@mdah.state.ms.usstaff hits enter sa...@mdah.state.ms.usstaff hits enter j...@mdah.state.ms.usstaff hits enter ci...@mdah.state.ms.usstaff does not hit enter and clicks on submit button then views the sortes email addresses, it displays as: ama...@mdah.state.ms.us b...@mdah.state.ms.us ci...@mdah.state.ms.usjoe@mdah.state.ms.us sa...@mdah.state.ms.us because the staff didn't hit enter on the last line. Is there a way to read each line of input and add a carriage return if needed? I tried the code below but it did not work, nothing happened, and i don't know to examine each line to see if it ends in \r\n either. $list2 = explode(\r\n, $list); foreach ($list2 as $key = $var) { $var = $var.\r\n; } $list = implode(\r\n, $list2); This may be best handled in your sorting code. What does it look like? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Communication between PHP Server code and HTML/JavaScript client without refreshing the page
Hi, It is RPC software. I have used it. It work for me. - Konstantin === Frn: Jon Smirl [SMTP:[EMAIL PROTECTED] Skickat: den 12 mars 1999 05:21 Till: [EMAIL PROTECTED] Angende: [PHP3] RPC for PHP from the browser This is a port of Microsoft's remote scripting that supports PHP as the processing system instead of ASP. The Script directory is an exact copy of the download available from http://www.microsoft.com/scripting but is has been extracted out of the windows exe to allow access from Unix. Remote scripting allows RPC calls to PHP objects located at the server. These calls can be synchronous or asynchronous. You can build some really cool pages by combining DHTML and RPC. In the simple case this lets you change part of a page without causing a reload. Remote scripting is supposed to work in MSIE and Netscape, but I haven't checked it in Netscape. The MS client components are unchanged, you use RSPROXY.CLASS and RS.HTM exactly as you would for the ASP engine. The only thing to watch for is that PHP method names are not case sensitive and Javascript names are. The result is that you need to always use lower case method names from your HTML file. RS.INC replaces RS.ASP on the server. They should function exactly the same, if they don't let me know. RSPROXY.JAVA source code is available by buying MS Visual Interdev. They distribute the compiled class for free. RSPROXY uses http GET to call remote methods which limits the amount of parameters that can be passed. At some point I'll recode it to use PUT and allow unlimited parameters. Simphp.htm -- client test program Simple.php3 -- server object being remoted rs.inc -- server support for remote scripting in php3 Jon Smirl [EMAIL PROTECTED] === Jon Haworth wrote: Hi Sharat, How do I communicate betwen an HTML page having JavaScript and a PHP server code without having to refresh the HTML page. I don't think this is possible: once PHP has run (and sent your Javascript to the browser), it's finished - you can't use it again until the next time the page loads. If you want to do this sort of thing you're looking at a Java applet or something along those lines. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php simple.php3 Description: application/unknown-content-type-php3_auto_file simphp.phtml Description: application/unknown-content-type-phtml_auto_file RSProxy.class Description: application/unknown-content-type-javaclassfile rs.js Description: JavaScript source -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Communication between PHP Server code and HTML/JavaScript client without refreshing the page
Hi, Excuse, skip one file. It is full set of RPC files. - Konstantin. Konstantin S. Kurilov wrote: Hi, It is RPC software. I have used it. It work for me. - Konstantin === Frn: Jon Smirl [SMTP:[EMAIL PROTECTED] Skickat: den 12 mars 1999 05:21 Till: [EMAIL PROTECTED] Angende: [PHP3] RPC for PHP from the browser This is a port of Microsoft's remote scripting that supports PHP as the processing system instead of ASP. The Script directory is an exact copy of the download available from http://www.microsoft.com/scripting but is has been extracted out of the windows exe to allow access from Unix. Remote scripting allows RPC calls to PHP objects located at the server. These calls can be synchronous or asynchronous. You can build some really cool pages by combining DHTML and RPC. In the simple case this lets you change part of a page without causing a reload. Remote scripting is supposed to work in MSIE and Netscape, but I haven't checked it in Netscape. The MS client components are unchanged, you use RSPROXY.CLASS and RS.HTM exactly as you would for the ASP engine. The only thing to watch for is that PHP method names are not case sensitive and Javascript names are. The result is that you need to always use lower case method names from your HTML file. RS.INC replaces RS.ASP on the server. They should function exactly the same, if they don't let me know. RSPROXY.JAVA source code is available by buying MS Visual Interdev. They distribute the compiled class for free. RSPROXY uses http GET to call remote methods which limits the amount of parameters that can be passed. At some point I'll recode it to use PUT and allow unlimited parameters. Simphp.htm -- client test program Simple.php3 -- server object being remoted rs.inc -- server support for remote scripting in php3 Jon Smirl [EMAIL PROTECTED] === Jon Haworth wrote: Hi Sharat, How do I communicate betwen an HTML page having JavaScript and a PHP server code without having to refresh the HTML page. I don't think this is possible: once PHP has run (and sent your Javascript to the browser), it's finished - you can't use it again until the next time the page loads. If you want to do this sort of thing you're looking at a Java applet or something along those lines. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Name: simple.php3 simple.php3Type: PHP3 (application/x-unknown-content-type-php3_auto_file) Encoding: base64 Name: simphp.phtml simphp.phtmlType: PHTML (application/x-unknown-content-type-phtml_auto_file) Encoding: base64 Name: RSProxy.class RSProxy.classType: Java Class File (application/x-unknown-content-type-javaclassfile) Encoding: base64 Name: rs.js rs.jsType: JavaScript Program (application/x-javascript) Encoding: 7bit RSProxy.class Description: application/unknown-content-type-javaclassfile rs.js Description: JavaScript source simple.php3 Description: application/unknown-content-type-php3_auto_file simphp.phtml Description: application/unknown-content-type-phtml_auto_file rs_php4.inc Description: application/unknown-content-type-inc_auto_file -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php