当前位置:网站首页>Using exec in PHP to display errors
Using exec in PHP to display errors
2022-06-11 09:50:00 【Burn oil to follow the sundial, and live in poverty】
exec("unoconv -f pdf test.docx 2>&1",$error_array,$code);
if($code!=0)
Log::info('unoconv2 File conversion failed :'.json_encode($error));
return false;
return true;
above exec Code in exec(" Your execution 2>&1", Returned error message 【 The array format 】, Error code (0 No mistake ,1 Erroneous ))
And when $code by 1 when ,$error_array There will be an error return in , At this point we just need to print out , You can know the cause of the error .
When $code by 0 when ,$error_array Will return an empty array
2>&1 : stay linux The meaning expressed in is Redirect errors to standard output , Errors and standard output are piped to the next command
边栏推荐
- VK2C22A/B抗干扰系列电表,水表段码LCD液晶驱动芯片资料(可定制DICE/COG)
- Ora-00059 exceeds DB_ Files limit
- New feature in ES6 -- arrow function
- ORACLE RAC中连接ScanIP报错ORA-12545的问题解决
- Opencv image basic operation (IV) -- image feature extraction (corner detection)
- Identifier keyword literal data type base conversion character encoding variable data type explanation operator
- 【Objective-C】动态创建控件
- keyboard entry.
- Where is it safer to open an account for soda ash futures? How much can soda ash futures do now?
- JS foundation -- about DOM
猜你喜欢

RAC expdp export error: ora-31693, ora-31617, ora-19505

我们是如何连上WiFi的?

Detailed explanation of the difference between construction method and method

ESP8266_ SmartConfig

document对象

考研數學 【數列極限證明題】題型方法總結

BeanFactory 与FactoryBean的区别

Exclusive interview - dialogue on open source Zhai Jia: excellent open source projects should be seen by more people. I am honored to participate in them

Day45 storage engine data type integer floating point character type date type enumeration and set type constraints table to table relationships

Interview questions: REM layout, flex layout, etc
随机推荐
ESP8266_ Get request weather forecast and JSON parsing
LeetCode刷题 —— 手撕二叉树
Opencv image basic operation (IV) -- image feature extraction (corner detection)
Leetcode brushing questions - hand tearing binary tree
Zhiyun health submitted the statement to HKEx again: the loss in 2021 exceeded 4billion yuan, an increase of 43% year-on-year
ORA-00059 超过db_files限制
JS foundation - array object
ESP8266_GET请求天气预报、json解析
ESP8266_ SNTP(Simple Network Time Protocol)
ESP8266_SNTP(Simple Network Time Protocol)
Where is it safer to open an account for soda ash futures? How much can soda ash futures do now?
Redis transaction details
Revisiting Self-Training for Few-Shot Learning of Language Model,EMNLP2021
OpenSSL usage
Identifier keyword literal data type base conversion character encoding variable data type explanation operator
js中关键字this的理解
An error will be reported when the RAC modifies the scanip to different network segments
Interview questions: REM layout, flex layout, etc
记录一下昨天的尴尬
Day45 storage engine data type integer floating point character type date type enumeration and set type constraints table to table relationships