PHP 读json文件并转php配置文件
2024-08-26 05:32:24
<?php
$c = file_get_contents('./cities_v2.json');
$s = "<?php return " . var_export(json_decode($c, true), true) . ";?>";
file_put_contents('./cities_config.php', $s);
?>
最新文章
- 关于JavaScript和html的随笔
- ndk学习7: 使用静态库
- swift学习笔记之-函数
- 【linux】暂时解决sis m672(神舟F4000 D9) linux驱动 宽屏分辨率的问题?
- indexOf()的用法
- poj - 2431 Expedition (优先队列)
- [JAVA]HDU 4919 Exclusive or
- 重载public Primes ():this(2,100)
- Oracle计算时间函数(numtodsinterval、numtoyminterval)
- JsSIP.UA.JsSIP 总是返回错误:422 Session Interval Too Small
- 最新最全的html5标签集合
- 第一章(认识jQuery)
- window安装pycharm Django
- nginx、swoole高并发原理初探
- SwipeableFlatList 实现类似于QQ列表滑动
- 安装zkpython出错
- Oozie分布式工作流——从理论和实践分析使用节点间的参数传递
- oracle中索引快速全扫描和索引全扫描的区别
- linux搭建简易版本的FastDFS服务器
- git的基本命令