Navigation

Call JAVA CLASS in PHP Application

How to call java class in PHP.

Here is the simple way.

1. Create java file.
2. Compile and execute the java file in command line mode, make sure your JAVA code is correct.
3. Here is our sample php code. our java file name is EmployeeTest.

<?php
exec("java EmployeeTest",$output)or die ('GO HELL');
print_r($output);
?>

Above PHP code will execute the JAVA and return the output.

mycomputer set java path environment

Please read below URL for setting Path environment.

http://www.itcsolutions.eu/2010/11/29/set-environment-variables-in-windo...

SFTP not working


#!/usr/local/bin/perl -w

use FindBin qw($Bin);
BEGIN{
unshift(@INC, 'Net');
unshift(@INC, 'Net/SFTP');
unshift(@INC, 'Net/SSH/Perl');
unshift(@INC, 'Net/SSH/Perl/Util');
}

use Net::SFTP;
use Net::SSH::Perl;
my $host = "abc.account.com";
my %args = (
user => 'chshtst',
password => '4getmenot',
debug => 'true'
);

my $sftp = Net::SFTP->new($host, %args);
print "connected!";

cpan sftp error

Use of uninitialized value $ENV{"HOME"} in concatenation (.) or string at C:/Per
l/site/lib/Net/SSH/Perl.pm line 108.
lenovo-PC: Reading configuration data /.ssh/config
lenovo-PC: Reading configuration data /etc/ssh_config
lenovo-PC: Connecting to sftp.happylife.in, port 22.
lenovo-PC: Net::SSH::Perl Version 1.35, protocol version 2.0.
The getpwuid function is unimplemented at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm
line 39, line 1.

***********************************************************

C:\Perl>dir
Volume in drive C has no label.

this show

This is per tesitn

cache

Get 10 digit phone number and replay that entered number

Below code snippet working fine in the http://evolution.voxeo.com/

<?php
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
?>

ivr sample code

IVR Application

DTMF SAMPLE

dtmf working sample

<?php
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
?>

[dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-6 dtmf-7 dtmf-8 dtmf-9]

Guess what the computer is thinking! Pick a number between 0 and 9.

combine two block into one block

display two block into one block

here one view block and another is content slider block


<?php
$content = '';
$block = '';
$module = 'views';
$delta = 'image_slider-block_1';
$block = module_invoke($module, 'block', 'view', $delta);
$content .= "";
$content .= "$block[subject]";
$content .= "$block[content]";
$content .= "";
$module = 'content_slider';
$delta = '1';
$block = module_invoke($module, 'block', 'view', $delta);

print array key and value

print array key and value


#!/usr/bin/perl

$array[0] = 'Monday';
$array[1] = 'Tueday';
$array[2] = 'Wedday';
$array[3] = 'Friday';

foreach $val (keys @array) {
print $val."=>".$array[$val]."\n";
}

Syndicate content