How to open any application, in web application program?
Moderator: General Moderators
How to open any application, in web application program?
hai,
In desktop application, using our code we can make open , any application.
Is it possible, in web application?
Regards,
Jasmine
In desktop application, using our code we can make open , any application.
Is it possible, in web application?
Regards,
Jasmine
Re: How to open any application, in web application program?
Yes, in most circumstances.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: How to open any application, in web application program?
In the browser then no. On the server you can execute applications if the configurations allow it. You would need to use a plug-in or Java for that.
(#10850)
Re: How to open any application, in web application program?
Hai,
i want to open a wordpad, using the PHP.
If i tried this code,
<?php
// Some servers may have an auto timeout, so take as long as you want.
set_time_limit(0);
// Show all errors, warnings and notices whilst developing.
error_reporting(E_ALL);
// Used as a placeholder in certain COM functions where no parameter is required.
$empty = new VARIANT();
// Load the appropriate type library.
com_load_typelib('Word.Application');
// Create an object to use.
$word = new COM('word.application') or die('Unable to load Word');
print "Loaded Word, version {$word->Version}\n";
// Open a new document with bookmarks of YourName and YourAge.
$word->Documents->Open('C:/web/Sundance/Delivery Notes/Delivery_Template.doc');
?>
I am getting the error message,
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `word.application': Access is denied. ' in D:\DocStation\testing_MIME\11.php:79 Stack trace: #0 D:\DocStation\testing_MIME\11.php(79): com->com('word.applicatio...') #1 {main} thrown in D:\DocStation\testing_MIME\11.php on line 79
Can anyone give me as suggesstion to solve this issue?
Regards,
Jasmine
i want to open a wordpad, using the PHP.
If i tried this code,
<?php
// Some servers may have an auto timeout, so take as long as you want.
set_time_limit(0);
// Show all errors, warnings and notices whilst developing.
error_reporting(E_ALL);
// Used as a placeholder in certain COM functions where no parameter is required.
$empty = new VARIANT();
// Load the appropriate type library.
com_load_typelib('Word.Application');
// Create an object to use.
$word = new COM('word.application') or die('Unable to load Word');
print "Loaded Word, version {$word->Version}\n";
// Open a new document with bookmarks of YourName and YourAge.
$word->Documents->Open('C:/web/Sundance/Delivery Notes/Delivery_Template.doc');
?>
I am getting the error message,
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `word.application': Access is denied. ' in D:\DocStation\testing_MIME\11.php:79 Stack trace: #0 D:\DocStation\testing_MIME\11.php(79): com->com('word.applicatio...') #1 {main} thrown in D:\DocStation\testing_MIME\11.php on line 79
Can anyone give me as suggesstion to solve this issue?
Regards,
Jasmine
Re: How to open any application, in web application program?
Please use the proper [ code = php ] tags when posting code.
Re: How to open any application, in web application program?
<?php
print 'test';
set_time_limit(0);
error_reporting(E_ALL);
$empty = new VARIANT();
com_load_typelib('Word.Application');
$word = new COM('word.application') or die('Unable to load Word');
print "Loaded Word, version {$word->Version}\n";
$word->Documents->Open('C:/web/Sundance/Delivery Notes/Delivery_Template.doc');
?>
print 'test';
set_time_limit(0);
error_reporting(E_ALL);
$empty = new VARIANT();
com_load_typelib('Word.Application');
$word = new COM('word.application') or die('Unable to load Word');
print "Loaded Word, version {$word->Version}\n";
$word->Documents->Open('C:/web/Sundance/Delivery Notes/Delivery_Template.doc');
?>
Re: How to open any application, in web application program?
Please use the proper [ code = php ] tags when posting code.
You may also want to edit your existing posts so that other users can better read your code.
You may also want to edit your existing posts so that other users can better read your code.
Re: How to open any application, in web application program?
i didnt understand? What u are expecting?
using my Php code, i want to open a word application.
That is, if i execute, this program, MsWord application, should open automatically.
This is my Php code
<?php
set_time_limit(0);
error_reporting(E_ALL);
$empty = new VARIANT();
com_load_typelib('Word.Application');
$word = new COM('word.application') or die('Unable to load Word');
print "Loaded Word, version {$word->Version}\n";
$word->Documents->Open('C:/web/Sundance/Delivery Notes/Delivery_Template.doc');
?>
This is my another example, to open the Notepad.
<?php
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("notepad.exe", 7, false);
?>
using my Php code, i want to open a word application.
That is, if i execute, this program, MsWord application, should open automatically.
This is my Php code
<?php
set_time_limit(0);
error_reporting(E_ALL);
$empty = new VARIANT();
com_load_typelib('Word.Application');
$word = new COM('word.application') or die('Unable to load Word');
print "Loaded Word, version {$word->Version}\n";
$word->Documents->Open('C:/web/Sundance/Delivery Notes/Delivery_Template.doc');
?>
This is my another example, to open the Notepad.
<?php
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("notepad.exe", 7, false);
?>
Re: How to open any application, in web application program?
There is a Code button you press when you want to post your PHP code. You then put your code inside of the tags. Once you have finished, change [ code ] to [ code=php ]. It will then look like this:
Code: Select all
<?php
print 'test';
set_time_limit(0);
error_reporting(E_ALL);
$empty = new VARIANT();
com_load_typelib('Word.Application');
$word = new COM('word.application') or die('Unable to load Word');
print "Loaded Word, version {$word->Version}\n";
$word->Documents->Open('C:/web/Sundance/Delivery Notes/Delivery_Template.doc');
?>
Re: How to open any application, in web application program?
hai tasairis,
I just go through, which you gave reference.
i tried one example,
I am getting the error message,
Warning: exec() [function.exec]: Unable to fork [whoami]
I just go through, which you gave reference.
i tried one example,
Code: Select all
<?php
// outputs the username that owns the running php/httpd process
// (on a system with the "whoami" executable in the path)
echo exec('whoami');
?>
I am getting the error message,
Warning: exec() [function.exec]: Unable to fork [whoami]
Re: How to open any application, in web application program?
I did that settings and then restarted my system.
Again, i executed my Program.
It shows, same error message.
Again, i executed my Program.
It shows, same error message.