Eclipse+PHP环境的配置+Flex
网上关于这类的帖子真的很多,但是我试了很多,例如把php plus for eclipse 下载下来,解压后放到Eclipse的plugin里面,但是不知道为什么,都不管用。
我从网上找到了一种比较简单的方法:那就是由Eclipse自己来更新自己的组件,这样的方法省去了很多的配置,可以直接拿来使用。
方法:
打开Eclipse->Help->Software Updates->Find and installed->Search for new features to install->New Remote Site:
在弹出的对话框中输入 name:Eclipseforphp(任意)
URL :http://phpeclipse.sourceforge.net/update/stable/1.2.x/site.xml
点击确定后,就可以自动链接,然后选中3项,大致包括Eclipse开发组件,debug组件等。选中安装就可以了。
另外,上面的URL是sourceforge的,如果这个地址连接不了,建议直接打开上一级连接,如
http://phpeclipse.sourceforge.net/update/stable,寻找可用的xml,导入即可。
相关文档:
PHP 5.2 及以上版本提供了 json_encode 和 json_decode 函数,相当好用。
而之前的版本则需要下载网友们自行开发的库(有兴趣的可以看下 http://code.itlearner.com/php/JSON-class.html )
可以参考如下这个方法来在低版本上扩充这两个函数:
if (!function_exists('json_encode') && !function_exists('j ......
java的写法
/**
*
* @param location
* @param nameList保存结果的!
*/
public void listDict(String location, List<String> nameList) {
File fileList = new File(location);
if (fileList.isDirectory()) {
File[] files = fileList.listFiles();
for (File f : files) {
i ......