我正在使用CodeIgniter框架开发一个众筹网站(类似于Kickstarter).
我使用这个库 "成功"实施了PayPal的自适应支付.
但是,我只是不确定如何正确和安全地检查成功/失败的付款和女巫数据对于保存到数据库很重要.
注意:这是一个链式延迟付款,我是主要接收者,次要接收者是众筹项目创建者.在预定的一段时间之后,钱被转移到次要接收器.
我现在的流程是这样的:
现在,我确定我错过了很多东西,但我不知道是什么:
非常感谢,我真的需要你的回答!
浏览Facebook API,我对正确的方法感到困惑.我希望用户跳过注册,或者如果他们使用Facebook登录则自动注册.因此,如果他们登录Facebook,我会收集他们的ID,电子邮件并在我的用户表中创建一条记录.
如果用户表中已存在id,则跳过自动注册并直接转到成员页面.这是我的代码到目前为止(摘自Facebook的PHP SDK示例).当我运行注册脚本时,页面显示为空白,我不会被重定向.
编辑:似乎在要求之后失败,如果我使用以下代码'test'永远不会被打印.
编辑:我正在使用Codeigniter,这个脚本是控制器的一部分,会导致问题的问题吗?
require 'http://localhost/facebook-php-sdk-6c82b3f/src/facebook.php';
echo "test";
Run Code Online (Sandbox Code Playgroud)
-
public function signup()
{
require 'http://localhost/facebook-php-sdk-6c82b3f/src/facebook.php';
// Create our Application instance (replace this with your appId and secret).
$facebook = new Facebook(array(
'appId' => 'xxxxxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',
));
// Get User ID
$user = $facebook->getUser();
// We may or may not have this data based on whether the user is logged in.
//
// If we have a $user id here, it means we know the user is …Run Code Online (Sandbox Code Playgroud) 正如手册所说:
注意:Session类不使用本机PHP会话.它生成自己的会话数据,为开发人员提供更多灵活性.
但是当我使用存储一些数据时$this->session->set_userdata(array('sample_key' => 'sample_value'));,phpinfo()我可以找到sample_key并且sample_value在那里.
我希望那部分
不使用本机PHP会话
意味着它隐藏了会话变量phpinfo().
我一直认为这可能是一种安全缺乏.可能吗?
看起来,这些价值观都是如此urlencode.
当我尝试在我的域上传这个项目时面临错误"无法使用提供的设置连接到您的数据库服务器"
我检查了我的config.php和database.php文件,所有信息都是正确的:
$db['default']['hostname'] = "etc.com";
$db['default']['username'] = "etc";
$db['default']['password'] = "etc@etc";
$db['default']['database'] = "visiting_link";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
Run Code Online (Sandbox Code Playgroud)
有没有解决这个问题的方法?请参考任何帮助材料.我正在使用fileZilla.
谢谢 !
我正在尝试运行一个程序,我收到此错误
Commands out of sync; you can't run this command now
Run Code Online (Sandbox Code Playgroud)
这是我得到的原始错误
命令不同步; 你现在不能运行这个命令
SELECT DISTINCT `property_id`, `pin`, `block_id`, `serial_no`, `status`, `ex_sn`, `ex_code`, `property_date_time`, `street_add`, `lab_name` FROM `view_property_user_lab` WHERE status = '6' AND lab_id = '01' AND designation IN( '5','6') LIMIT 10
Run Code Online (Sandbox Code Playgroud)
可以任何1告诉我为什么我得到这个错误以及如何摆脱它.我正在使用Code igniter,我也试过这个
$query->free_result().
Run Code Online (Sandbox Code Playgroud)
在我的程序中,我使用了这个陈述
SELECT *
FROM
temp_calculated_rates_and_rules;
-- and then
TRUNCATE temp_calculated_rates_and_rules;
Run Code Online (Sandbox Code Playgroud)
因为这个东西在PHP循环中被调用,就像这样
$arrIds = array('5','10');
foreach ($arrIds as $id)
{
$this->_StoredProcedureMapper->setPId($id);
$p10values = $this->_StoredProcedureMapper->fetch_p10_values();
if (intval(@$p10values[0]['is_exempted']) != 1)
{
$this->generate_p10($p10values);
}
}
Run Code Online (Sandbox Code Playgroud)
这是mapper函数
function fetch_p1_values()
{ …Run Code Online (Sandbox Code Playgroud) 我想从另一个控制器(比如controller_b)调用控制器中的一个函数(比如controller_a)
请帮我 ..
以下是在Codeigniter中XSS清理数据的方法:
global_xss_filtering在config中设置为TRUExss_clean()xss_clean验证规则TRUEin$this->input->post('something', TRUE)是否可以在一个数据上使用全部或多个?
例如,它会好起来的,如果我仍然使用$this->input->post('something', TRUE),如果数据已被清除,甚至global_xss_filtering和xss_clean验证规则?
我正在使用jquery插件进行多个文件上传.一切都运行正常,除了删除图像.Firebug说JS正在向函数发送DELETE请求.如何从删除请求中获取数据?
PHP删除代码:
public function deleteImage() {
//Get the name in the url
$file = $this->uri->segment(3);
$r = $this->session->userdata('id_user');
$q=$this->caffe_model->caffe_get_one_user($r);
$cff_name= $q->name;
$cff_id = $q->id_caffe;
$w = $this->gallery_model->gallery_get_one_user($gll_id);
$gll_name = $w->name;
$success = unlink("./public/img/caffe/$cff_name/$gll_name/" . $file);
$success_th = unlink("./public/img/caffe/$cff_name/$gll_name/thumbnails/" . $file);
//info to see if it is doing what it is supposed to
$info = new stdClass();
$info->sucess = $success;
$info->path = $this->getPath_url_img_upload_folder() . $file;
$info->file = is_file($this->getPath_img_upload_folder() . $file);
if (IS_AJAX) {//I don't think it matters if this is set …Run Code Online (Sandbox Code Playgroud) 我试着从这个评论的想法代码点火器控制器/模型名称冲突
在core/CodeIgniter.php上找到类名变量:
$class = $RTR->fetch_class(); 并改变这样:
$class = 'Controller' . $RTR->fetch_class();
现在更改控制器名称:
class ControllerUser extends CI_Controller { ...
它工作,现在我可以使用用户模型和用户控制器.但我的问题是,它有意义吗?还是问题?(抱歉,我的英文不好)
我的看法:
<form action="<?=base_url()?>index.php/frontend/main_con/temp">
<input type="text" name="temp">
<input type="submit"/>
</form>
Run Code Online (Sandbox Code Playgroud)
控制器:
function temp(){
echo $_GET['temp'];
}
Run Code Online (Sandbox Code Playgroud)
我无法达到此功能,我收到了一个错误
遇到错误您提交的URI不允许使用字符.
那么,如何使用GET方法在控制器中传递表单数据?提前.