ÔÚC#ÀïÔõôʵÏÖ£ºwindows·ÃÎÊ(¶ÁÈ¡)linuxÉϵÄÎļþ£¿
ÀûÓÃpsftp.exe¿ÉÒÔÔÚdos½çÃæÏ£¬ÊµÏÖlinuxÎļþµÄÉÏ´«ºÍÏÂÔØ¡£
»¹¿ÉÒÔͨ¹ýµ÷ÓÃProcessµÄÃüÁʽ£¬ÊµÏÖÉÏ´«Îļþµ½linuxÉÏ,
µ«ÊÇʵÏÖÎļþÏÂÔØµ½windowsʱ£¬¾Í²»ÐС£ÏÂÃæÊÇÏÂÔØÊ±µÄÔ´´úÂë
¶øÍ¬ÑùµÄuploadʱ£¬ÊÇ¿ÉÒԵ쬲»ÖªµÀΪʲô»áÕâÑù£º
#region Download
// Upload the files
// output of the plugin during its running in console
public string Download()
¡¡¡¡ {
¡¡¡¡ string outPutMessage = "";
¡¡¡¡ string scriptLocation = "";
//Create Script File
¡¡¡¡ scriptLocation = this.CreateScriptFile();
¡¡¡¡
¡¡¡¡ //Run the Upload event
¡¡¡¡ ProcessStartInfo processInfo = new ProcessStartInfo();
¡¡¡¡ //Set the Shell Command(the plugins' path)
¡¡¡¡ processInfo.FileName = this.m_ShellCommand;
¡¡¡¡ //Don't show console window
¡¡¡¡ processInfo.CreateNoWindow = true;
¡¡¡¡ //don't use shell to execute this script
¡¡¡¡
Ïà¹ØÎÊ´ð£º
//C ½Ó¿Ú
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//ÎÒÔÚC#ÖÐÉùÃ÷
//µ÷ÓÃC DLL Öеĺ¯Êý
[DllImport("OCRapi.dll&quo ......
ÎÒĿǰÔÚ±¾µØµÄlinuxÉÏдÁËÒ»¸öswingµÄ½çÃæ£¬Ïëͨ¹ýÕâ¸ö½çÃæÀ´¿ØÖÆÆäËüµçÄÔµÄlinuxÖØÆô¡£
ÎÒÖªµÀÓÃRuntime.getRuntime().exec("shutdown -r");¿ÉÒÔ¿ØÖƱ¾»úLinuxÖØÆô£¬µ«ÊÇÔõô¿ØÖÆÔ¶³ÌµÄlinuxÖØÆôÄØ£¿ ......
ʹÓÃPHPµÄexecº¯Êýµ÷ÓÃlinuxµÄshellÃüÁÈçdateÈ¥ÐÞ¸Äʱ¼ä»òshutdownȥʵÏֹػú/ÖØÆô£¬µ«ÊÇ·µ»ØÖµ¶¼ÊÇʧ°ÜµÄ¡£¾¹ý¶à´ÎÊÔÑ飬È϶¨ÊÇûÓÐȨÏÞµÄÎÊÌâ¡£
ËùÒÔ£¬Ð¡µÜÔÚ´ËÇë½Ì¸÷룬ÈçºÎ²ÅÄÜÉèÖÃȨÏÞ£¬µ÷ÓÃlinux shellà ......
ÎÒÃÇÁ¥ÊôÖпÆÔº¼ÆËãËùÍøÂçÖØµãʵÑéÊÒ(http://www.ict.ac.cn/survey/channel/detail443.asp)»ù´¡ÉèÊ©¿ÎÌâ×é.
ÏÖÒòÏîÄ¿ºÍÒµÎñÍØÕ¹µÄÐèÒª,ÌØÐèÒªÕÐÆ¸ÓëÏîÄ¿Ïà¹ØµÄÍøÂçÓ¦Óù¤³Ìʦ1-2Ãû¡£
¾ßÌåÒªÇóÈçÏ¡£ÓÐÒâÕß ......