我有一个问题是使用curl操作获取数据.在这里我隐藏了令牌,如果我只在我的浏览器中使用url然后它返回数据但在这里它为null.
<?php
$token = "TOKEN"; //the actual token hidden
$url = "https://crm.zoho.com/crm/private/xml/Leads/getRecords?authtoken=".$token."&scope=crmapi";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
$result = curl_exec($ch);
curl_close($ch);
echo $result; //does not return anything
?>
Run Code Online (Sandbox Code Playgroud)
哪里我搞错了请帮助我.
post方法有问题.
我有一个html表单,我使用textarea作为禁用,textarea 的值来自另一个页面的帮助下的数据库.
<textarea disabled name="sms" id="sms">
<?php echo $value; //Here the value of textarea and it shows on it?>
</textarea>
Run Code Online (Sandbox Code Playgroud)
我的PHP代码是 -
<?php
if(isset($_POST['submit'])){
echo $_POST['sms']; //This line prints nothing
}
Run Code Online (Sandbox Code Playgroud)
我的HTML代码 -
<form action="" method="POST">
<textarea disabled name="sms" id="sms">
<?php echo $value; //Here the value of textarea and it shows on it?>
</textarea>
<input type="submit" name="submit"/>
</form>
Run Code Online (Sandbox Code Playgroud)
当我想通过它的值来验证它时,我变空了.
为什么会这样?
需要帮忙!!