今日话题

哪种程序语言对你的吸引力更大?

智言 2015年04月16日 阅读(6682) 16

在面对如今的零零散散的各种编程语言,智言我已经是眼花缭乱了,感觉自己是没有哪一门特别的精,但是大部分流行的语言又基本都会点,就是这样要死不活的状态一直困扰着我,我到底该走哪个方向是我一直摇摆不定的,如果此时的你也是这样的状态,请分享下你的想法和选择吧,让大家一起为糊涂的我们指明一条光明的道路吧!Java/PHP/IOS/JS/CSS3/HTML5/C++/C#…..太多了。

智言

业务开发请联系QQ:5679361

评论 16

评论前必须登录!

 

  1. 写的不错哈,支持一下

    10年前 (2016-08-24) 回复
  2. 谢谢博主分享,很实用!

    10年前 (2016-08-23) 回复
  3. 非常高兴遇到这么好的文章 谢谢

    10年前 (2015-12-07) 回复
  4. 评论框出错啦(990015): CS数据库异常,请联系客服人员,人品太差DUANG~~

    10年前 (2015-12-03) 回复
  5. 测试头像

    10年前 (2015-12-03) 回复
  6. [伤心]

    11年前 (2015-10-06) 回复
  7. 18896.jpg继续测试

    11年前 (2015-09-07) 回复
  8. <?php
    //应用的APPID
    $app_id = “YOUR_APP_ID”;
    //应用的APPKEY
    $app_secret = “YOUR_APP_KEY”;
    //成功授权后的回调地址
    $my_url = “YOUR_REDIRECT_URL”;

    //Step1:获取Authorization Code
    session_start();
    $code = $_REQUEST[“code”];
    if(empty($code))
    {
    //state参数用于防止CSRF攻击,成功授权后回调时会原样带回
    $_SESSION[‘state’] = md5(uniqid(rand(), TRUE));
    //拼接URL
    $dialog_url = “https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=
    . $app_id . “&redirect_uri=” . urlencode($my_url) . “&state=”
    . $_SESSION[‘state’];
    echo(“”);
    }

    //Step2:通过Authorization Code获取Access Token
    if($_REQUEST[‘state’] == $_SESSION[‘state’])
    {
    //拼接URL
    $token_url = “https://graph.qq.com/oauth2.0/token?grant_type=authorization_code&amp;“
    . “client_id=” . $app_id . “&redirect_uri=” . urlencode($my_url)
    . “&client_secret=” . $app_secret . “&code=” . $code;
    $response = file_get_contents($token_url);
    if (strpos($response, “callback”) !== false)
    {
    $lpos = strpos($response, “(“);
    $rpos = strrpos($response, “)”);
    $response = substr($response, $lpos 1, $rpos – $lpos -1);
    $msg = json_decode($response);
    if (isset($msg->error))
    {
    echo “

    error:

    ” . $msg->error;
    echo “

    msg :

    ” . $msg->error_description;
    exit;
    }
    }

    //Step3:使用Access Token来获取用户的OpenID
    $params = array();
    parse_str($response, $params);
    $graph_url = “https://graph.qq.com/oauth2.0/me?access_token=
    $params[‘access_token’];
    $str = file_get_contents($graph_url);
    if (strpos($str, “callback”) !== false)
    {
    $lpos = strpos($str, “(“);
    $rpos = strrpos($str, “)”);
    $str = substr($str, $lpos 1, $rpos – $lpos -1);
    }
    $user = json_decode($str);
    if (isset($user->error))
    {
    echo “

    error:

    ” . $user->error;
    echo “

    msg :

    ” . $user->error_description;
    exit;
    }
    echo(“Hello ” . $user->openid);
    }
    else
    {
    echo(“The state does not match. You may be a victim of CSRF.”);
    }
    ?>

    11年前 (2015-09-05) 回复
  9. <?php
    //应用的APPID
    $app_id = “YOUR_APP_ID”;
    //应用的APPKEY
    $app_secret = “YOUR_APP_KEY”;
    //成功授权后的回调地址
    $my_url = “YOUR_REDIRECT_URL”;

    //Step1:获取Authorization Code
    session_start();
    $code = $_REQUEST[“code”];
    if(empty($code))
    {
    //state参数用于防止CSRF攻击,成功授权后回调时会原样带回
    $_SESSION[‘state’] = md5(uniqid(rand(), TRUE));
    //拼接URL
    $dialog_url = “https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=
    . $app_id . “&redirect_uri=” . urlencode($my_url) . “&state=”
    . $_SESSION[‘state’];
    echo(“”);
    }

    //Step2:通过Authorization Code获取Access Token
    if($_REQUEST[‘state’] == $_SESSION[‘state’])
    {
    //拼接URL
    $token_url = “https://graph.qq.com/oauth2.0/token?grant_type=authorization_code&amp;“
    . “client_id=” . $app_id . “&redirect_uri=” . urlencode($my_url)
    . “&client_secret=” . $app_secret . “&code=” . $code;
    $response = file_get_contents($token_url);
    if (strpos($response, “callback”) !== false)
    {
    $lpos = strpos($response, “(“);
    $rpos = strrpos($response, “)”);
    $response = substr($response, $lpos + 1, $rpos – $lpos -1);
    $msg = json_decode($response);
    if (isset($msg->error))
    {
    echo “

    error:

    ” . $msg->error;
    echo “

    msg :

    ” . $msg->error_description;
    exit;
    }
    }

    //Step3:使用Access Token来获取用户的OpenID
    $params = array();
    parse_str($response, $params);
    $graph_url = “https://graph.qq.com/oauth2.0/me?access_token=
    $params[‘access_token’];
    $str = file_get_contents($graph_url);
    if (strpos($str, “callback”) !== false)
    {
    $lpos = strpos($str, “(“);
    $rpos = strrpos($str, “)”);
    $str = substr($str, $lpos + 1, $rpos – $lpos -1);
    }
    $user = json_decode($str);
    if (isset($user->error))
    {
    echo “

    error:

    ” . $user->error;
    echo “

    msg :

    ” . $user->error_description;
    exit;
    }
    echo(“Hello ” . $user->openid);
    }
    else
    {
    echo(“The state does not match. You may be a victim of CSRF.”);
    }
    ?>

    11年前 (2015-09-05) 回复
  10. 测试第二张图片1.jpg

    11年前 (2015-08-07) 回复
  11. 测试图片CrJqf4BhPTEwMDAwMDgwJmI9dHR6aGkmaz1BS0lE

    11年前 (2015-08-05) 回复
  12. 仧尐

    总结的非常好啊 你的博客非常好,我也推荐一下我的博客: http://www.javaxxz.com。希望有机会一起进步。

    11年前 (2015-07-26) 回复
  13. 说的对

    11年前 (2015-07-19) 回复


如果你觉得本站内容对你有所帮助,比如提升你对编程方面的认识,你可以通过上面的二维码请博主喝杯咖啡,安好。

WEB前端开发部落(公众号:webapp_club)

群列表

前端初级学习群:初级Web前端学习群(后期为支付入群)
PHP初级学习群:PHP(MySQL)学习交流群
QQ群仅作为相关领域讨论平台,均提供高质量问题交流,禁止闲聊,无法接受的朋友请勿加群!
进群需要通过这里获取进群码才能进群哦!

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏