dqtok88424 2013-03-15 21:58
浏览 59
已采纳

CodeIgniter中的敏感数据

I am building a CodeIgniter 2.1.3 application that uses the Twitter OAuth API for several functions. I have all my tokens for the Twitter API in a separate file, app_tokens.php, which is ignored by git. What function do I use to include this file in my Tweet class?

app_tokens.php:

<?php 
$consumer_key = 'xxxxxxxxxxxxxxxxxxxxxx';
$consumer_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$user_token = 'xxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxx';
$user_secret = 'xxxxxxxxxxxxxxxxxxxx';
?>

Thanks!

  • 写回答

2条回答 默认 最新

  • dozabg1616 2013-03-15 22:04
    关注

    Found my answer in https://www.codeigniter.com/user_guide/libraries/config.html. Thanks for the help though!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?