npm 配置淘宝镜像

npm install -g cnpm --registry=http://registry.npm.taobao.org 

php的一个不错的方法:

pathinfo() 函数以数组的形式返回文件路径的信息。

<?php
print_r(pathinfo("/testweb/test.txt"));
?>

输出

Array
(
[dirname] => /testweb
[basename] => test.txt
[extension] => txt
)

若是:

<?php
print_r(pathinfo("/testweb/test.txt",PATHINFO_BASENAME));
?>
test.txt

猜你喜欢

转载自blog.csdn.net/weixin_38996069/article/details/88568051