首页
it技术
登录
6mi
u
盘
搜
搜 索
it技术
php错误处理
php错误处理
it
2024-01-15
69
如果没有错误处理机制会怎样?
文件没有打开,但仍然向下执行,输出了ok
<?php
$file
=
fopen
(
'./aaa.php'
,
'r'
)
;
echo
'ok'
;
/* 输出结果; Warning: fopen(./aaa.txt): failed to open stream: No such file or directory in F:\wamp\www\test.php on line 2 ok */
添加错误处理机制
使用file_exists()函数检查文件
转载请注明原文地址: https://lol.8miu.com/read-13410.html
最新回复
(
0
)