ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-spanish
php-spanish
[PHP-ES] system no me imprime en el php
by Gorka other posts by this author
Oct 21 2009 6:14AM messages near this date
Re: [PHP-ES] XAMPP y ORACLE | Re: [PHP-ES] system no me imprime en el php
Tengo este c�digo en PHP:

 

 

echo '<pre> ';

$last_line = system('ls', $retval);

echo '

</pre> 

<hr /> Last line of the output: ' . $last_line . '

<hr /> Return value: ' . $retval;

echo '<pre> ';

$last_line = system('prueba.pl', $retval);

echo '

</pre> 

<hr /> Last line of the output: ' . $last_line . '

<hr /> Return value: ' . $retval;

 

 

Y me devuelve esto:

 

 

prueba.pl

prueba.pl~

 

----------------------------------------------------------------------------
----

Last line of the output: prueba.pl~ 

----------------------------------------------------------------------------
----

Return value: 0

 

----------------------------------------------------------------------------
----

Last line of the output: 

----------------------------------------------------------------------------
----

Return value: 127 

 

 

El primer resultado, el del 'ls' sale bien. �Por qu� no salen los prints de
mi programa 'prueba.pl'?

 

El fichero prueba.pl contiene:

 

#!/usr/bin/perl

use List::Util qw (sum);

use strict;

use warnings;

use diagnostics;

 

my $chr;

print "\nExtrayendo ...\n\n";

$chr = "prueba";

print $chr."\n";

print "\nFinalizado.";[/perl]

 

 

 
Thread:
Gorka
Jonathan Tapicer
Gorka

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved