我在此代码中的类型对话方面遇到一些问题(使用 Facebook PHP SDK 3.0.1):
$page_id = 192485754113829;
$post_limit = 2;
$query = "select post_id, source_id, actor_id, target_id, created_time, likes, message, attachment, comments from stream where source_id = '.$page_id.' LIMIT '.$post_limit.'";
解析器错误:意外的“.”在位置130。
我无法解释该代码在不同主机上的工作方式不同。
php.ini 中是否有一些类型设置
$query = "select post_id, source_id, actor_id, target_id,
created_time, likes, message, attachment, comments
from stream where source_id = '$page_id' LIMIT $post_limit ";
会工作。
或者如果你想使用串联:
$query = "select post_id, source_id, actor_id, target_id,
created_time, likes, message, attachment, comments
from stream where source_id = ".$page_id." LIMIT ".$post_limit;
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)