php-general Digest 24 May 2010 21:31:41 -0000 Issue 6762
Topics (messages 305479 through 305493):
Zend_Soap_Client --HOw to pass what function to call from wsdl
305479 by: shahrzad khorrami
305480 by: shahrzad khorrami
CERRAR NAVEGADOR y VENTANA CON PHP
305481 by: MSc. Carlos Pollan Estrada
305482 by: Daniel Brown
Dynamic Menus in a PHP Form Issue
305483 by: Alice Wei
305484 by: tedd
Re: Remove blank lines from a file
305485 by: tedd
305487 by: Robert Cummings
exec in different directory where PHP is Installed
305486 by: loki
305488 by: Kevin Kinsey
305489 by: Bob McConnell
305490 by: loki
305491 by: loki
305492 by: Bob McConnell
editing a file
305493 by: Andres Gonzalez
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
hi all,
Is it possible to define (pass a argument 'function name') that we can
change the function to call from soap? for example here we can pass getList
and then = $client->geList() must call... it means pass what function to
call from wsdl...
$this->_helper->results('this func must call from wsdl')
class Zend_Controller_Action_Helper_Results extends
Zend_Controller_Action_Helper_Abstract
{
$client = new Zend_Soap_Client('http://192.168.200.18/neuron.wsdl',
$options);
$result = $client->*getUsers*();
Regards,
Shahrzad Khorrami
--- End Message ---
--- Begin Message ---
ok friends, solved ;)
$funName = 'getAssetHostsList';
$results = $this->_helper->results($funName);
$result = $client->$funName();
Thanks
shahrzad
--- End Message ---
--- Begin Message ---
Hola colega.
Necesito saber cómo cerra una ventana y cómo cerrar el navegador
utilizando PHP
Gracias de antemano
Salu2
cpollan
--- End Message ---
--- Begin Message ---
2010/5/24 MSc. Carlos Pollan Estrada <[email protected]>:
> Hola colega.
> Necesito saber cómo cerra una ventana y cómo cerrar el navegador
> utilizando PHP
No es posible con PHP. Esta es un trabajo por JavaScript.
En el futuro, utilizad la lista por PHP de espanol:
[email protected]
--
</Daniel P. Brown>
[email protected] || [email protected]
http://www.parasane.net/ || http://www.pilotpig.net/
We now offer SAME-DAY SETUP on a new line of servers!
--- End Message ---
--- Begin Message ---
Hi, I have a snippet as in the following: <ul>
<li>Select the type of your starting point of interest:<br/>
<div id="start_menu"><form action="" name="form1" method="post">
<span><input type="radio" value="Apartment" name="start"
onclick="alert(document.form1.start)"/> Apartment
</span> </form></div></li> </ul>If
I tried to put this at the top of a file where I save as PHP with other PHP
execution statements, looks like the form does not do anything, and yet when I
save the page as in HTML with out the other PHP execution, it works. I am
trying to create a page where I have dynamic drop down menu lists so users can
egenerate dynamic content based on their preference. Is it possible that I can
save the entire file as a PHP and still keep the functionality, including
generating dynamic menus, writing the proper entries to the database and
printing out the proper output?
Thanks for your help.
Alice
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
--- End Message ---
--- Begin Message ---
At 10:46 AM -0400 5/24/10, Alice Wei wrote:
Hi, I have a snippet as in the following: <ul>
<li>Select the type of your starting point of interest:<br/>
<div id="start_menu"><form action="" name="form1" method="post">
<span><input type="radio" value="Apartment" name="start"
onclick="alert(document.form1.start)"/> Apartment </span>
</form></div></li> </ul>If I tried to put this at the top
of a file where I save as PHP with other PHP execution statements,
looks like the form does not do anything, and yet when I save the
page as in HTML with out the other PHP execution, it works. I am
trying to create a page where I have dynamic drop down menu lists so
users can egenerate dynamic content based on their preference. Is it
possible that I can save the entire file as a PHP and still keep the
functionality, including generating dynamic menus, writing the
proper entries to the database and printing out the proper output?
Thanks for your help.
Alice
Alice:
I'm not sure as to what it is that you are asking, but php runs on
the server and is done by time anyone looks at a select control.
If you want a dynamic select, then there are two basic types: 1)
dynamically generated on the server based upon what the user indicted
via a previous submit; 2) dynamically generated on the client-side
based upon what the user indicted via a javascript trigger.
Now, please describe which type you want?
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
At 2:48 PM -0400 5/23/10, Robert Cummings wrote:
tedd wrote:
At 1:02 PM -0400 5/22/10, Robert Cummings wrote:
tedd wrote:
If that is all (i.e., removing double linefeeds), then this will do it:
$text_array = array();
$text_array = explode("\n\n", $input_text);
$output_text = implode("\n",$text_array);
Sorry tedd, this is broken. It doesn't solve problems with runs of
greater than 2 newlines which is even in the example :) I would
use the following instead which is also line break agnostic with
final output in the style for your system:
<?php
$data = preg_replace( "#[\r\n]+#", PHP_EOL, $input );
?>
Cheers,
Rob.
Rob:
It's not broken according to my "given", which was "If that is all
(i.e., removing double linefeeds), then this will do it:" My code
does exactly what was stated.
Actually, his comment didn't say double line feeds... his comment
said I want THIS to look like THAT. And THIS had a triple line feed
and THAT completely normalized it to a single line feed. I realize
you misunderstood the problem, but where I work, clients don't think
a solution based on incorrect presumptions is a valid solution for a
clearly defined problem :)
Rob:
Okay, so I didn't correctly identify and understand the problem from
the client (the list), but my solution worked for the problem I
understood.
Whereas:
Doh, what's funny is I fixed it in my test script but had already
pasted into my email and forgot to update that *lol*. Good catch!
You correctly identified and understood the problem, but failed to
provide a working solution to the client (the list).
It's a good thing that we both have clients who understand we're not
prefect. :-)
Let's just agree that we both can identify, understand, and solve
such minor problems.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
tedd wrote:
At 2:48 PM -0400 5/23/10, Robert Cummings wrote:
tedd wrote:
At 1:02 PM -0400 5/22/10, Robert Cummings wrote:
tedd wrote:
If that is all (i.e., removing double linefeeds), then this will do it:
$text_array = array();
$text_array = explode("\n\n", $input_text);
$output_text = implode("\n",$text_array);
Sorry tedd, this is broken. It doesn't solve problems with runs of
greater than 2 newlines which is even in the example :) I would
use the following instead which is also line break agnostic with
final output in the style for your system:
<?php
$data = preg_replace( "#[\r\n]+#", PHP_EOL, $input );
?>
Cheers,
Rob.
Rob:
It's not broken according to my "given", which was "If that is all
(i.e., removing double linefeeds), then this will do it:" My code
does exactly what was stated.
Actually, his comment didn't say double line feeds... his comment
said I want THIS to look like THAT. And THIS had a triple line feed
and THAT completely normalized it to a single line feed. I realize
you misunderstood the problem, but where I work, clients don't think
a solution based on incorrect presumptions is a valid solution for a
clearly defined problem :)
Rob:
Okay, so I didn't correctly identify and understand the problem from
the client (the list), but my solution worked for the problem I
understood.
Whereas:
Doh, what's funny is I fixed it in my test script but had already
pasted into my email and forgot to update that *lol*. Good catch!
You correctly identified and understood the problem, but failed to
provide a working solution to the client (the list).
It's a good thing that we both have clients who understand we're not
prefect. :-)
Let's just agree that we both can identify, understand, and solve
such minor problems.
If you had been a real client I would have tested before shipping :) My
problem would have been caught immediately, yours could have been
silently wreaking havoc my altering data. I'd rather a completely broken
solution than a half working solution that presents itself at a later
time :|
The only reason I bothered to bring it up though, is because these
miscommunications between client and developer (and any number of in
betweens was the focus of a memorable cartoon that our professor
presented to all of us in a second year programming course (Prgramming
in the Large with C++). It highlighting the conceptual differences
between different people in the production chain and how the client
pretty mich didn't get what he wanted :)
Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.
--- End Message ---
--- Begin Message ---
Hello,
PHP is installed in c:\program files\php
the PHP script are in network drive \\xxx.xxx.xxx.xxx\scriptdir\
in the PHP script, we try to launch the command @exec(...) with a
executable located in c:\program files\ourexecutable\
it's not work :(
but if we move the PHP script from \\xxx.xxx.xxx.xxx\scriptdir\
to c:\scriptdir\ then it's work !!
everything work good EXCEPT the @EXEC command ...
Safe mode in PHP is OFF ...
Thanks by advance for you help
stephane
--- End Message ---
--- Begin Message ---
loki wrote:
Hello,
PHP is installed in c:\program files\php
the PHP script are in network drive \\xxx.xxx.xxx.xxx\scriptdir\
in the PHP script, we try to launch the command @exec(...) with a
executable located in c:\program files\ourexecutable\
it's not work :(
but if we move the PHP script from \\xxx.xxx.xxx.xxx\scriptdir\
to c:\scriptdir\ then it's work !!
everything work good EXCEPT the @EXEC command ...
Safe mode in PHP is OFF ...
Hello,
Can you show us the script? The first thing I'd do is
call "is_file(\\xxx.xxx.xxx.xxx\scriptdir\foo.php)" ... are
you doing that?
Kevin Kinsey
--- End Message ---
--- Begin Message ---
From: loki
> PHP is installed in c:\program files\php
> the PHP script are in network drive \\xxx.xxx.xxx.xxx\scriptdir\
> in the PHP script, we try to launch the command @exec(...) with a
> executable located in c:\program files\ourexecutable\
>
> it's not work :(
>
> but if we move the PHP script from \\xxx.xxx.xxx.xxx\scriptdir\
> to c:\scriptdir\ then it's work !!
>
> everything work good EXCEPT the @EXEC command ...
Is 'C:\Program Files\PHP' in your PATH? You may need to add that
manually.
Bob McConnell
--- End Message ---
--- Begin Message ---
the script is vbulletin
function fetch_im_exec($command, $args, $needoutput = false, $dieongs =
true)
{
if (!function_exists('exec'))
{
$this->error =
array(fetch_error('php_error_exec_disabled'));
return false;
}
$imcommands = array(
'identify' => $this->identifypath,
'convert' => $this->convertpath,
);
$input = $imcommands["$command"] . ' ' . $args . ' 2>&1';
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' AND PHP_VERSION <
'5.3.0')
{
$input = '"' . $input . '"';
}
$exec = @exec($input, $output, $this->returnvalue);
when i put the script in \\xxx.xxx.xxx.xxx\scriptdir\
the result is empty
when i put the script everywhere in the c: then
the result is good !
in both case $input is the same and point to c:\program
files\im\identify.exe
i use php 5.2.8 on windows
thanks by advance
stephane
On 5/24/2010 11:11 PM, Kevin Kinsey wrote:
loki wrote:
Hello,
PHP is installed in c:\program files\php
the PHP script are in network drive \\xxx.xxx.xxx.xxx\scriptdir\
in the PHP script, we try to launch the command @exec(...) with a
executable located in c:\program files\ourexecutable\
it's not work :(
but if we move the PHP script from \\xxx.xxx.xxx.xxx\scriptdir\
to c:\scriptdir\ then it's work !!
everything work good EXCEPT the @EXEC command ...
Safe mode in PHP is OFF ...
Hello,
Can you show us the script? The first thing I'd do is
call "is_file(\\xxx.xxx.xxx.xxx\scriptdir\foo.php)" ... are
you doing that?
Kevin Kinsey
--- End Message ---
--- Begin Message ---
On 5/24/2010 11:31 PM, Bob McConnell wrote:
From: loki
PHP is installed in c:\program files\php
the PHP script are in network drive \\xxx.xxx.xxx.xxx\scriptdir\
in the PHP script, we try to launch the command @exec(...) with a
executable located in c:\program files\ourexecutable\
it's not work :(
but if we move the PHP script from \\xxx.xxx.xxx.xxx\scriptdir\
to c:\scriptdir\ then it's work !!
everything work good EXCEPT the @EXEC command ...
Is 'C:\Program Files\PHP' in your PATH? You may need to add that
manually.
Bob McConnell
no ? but why i would need to add C:\Program Files\PHP in my path ?
why it's explain that it's work when the php script are located in any
directory under c: and not under \\xxx.xxx.xxx.xxx\scriptdir\ ??
thanks by advance
stephane
--- End Message ---
--- Begin Message ---
From: loki
> On 5/24/2010 11:31 PM, Bob McConnell wrote:
>> From: loki
>>
>>> PHP is installed in c:\program files\php
>>> the PHP script are in network drive \\xxx.xxx.xxx.xxx\scriptdir\
>>> in the PHP script, we try to launch the command @exec(...) with a
>>> executable located in c:\program files\ourexecutable\
>>>
>>> it's not work :(
>>>
>>> but if we move the PHP script from \\xxx.xxx.xxx.xxx\scriptdir\
>>> to c:\scriptdir\ then it's work !!
>>>
>>> everything work good EXCEPT the @EXEC command ...
>>
>> Is 'C:\Program Files\PHP' in your PATH? You may need to add that
>> manually.
>
> no ? but why i would need to add C:\Program Files\PHP in my path ?
> why it's explain that it's work when the php script are located in any
> directory under c: and not under \\xxx.xxx.xxx.xxx\scriptdir\ ??
What is the exact error message you get when it doesn't work?
Bob McConnell
--- End Message ---
--- Begin Message ---
I have a large C source file that is generated by a separate
source-generating program. When the generated src file is compiled, it
produces tons of warnings. I want to edit the generated src file and
delete the offending lines.
What is the easiest way using a PHP script to read in a file, search for
a particular signature, and delete a couple of lines? Seems like this
would be very easy in PHP.
Thanks,
-Andres
--- End Message ---