在做同志湾,然后遇到了问题。我就想当函数用就够了,直接双引号没问题,换成变量就不响应。额$entxt=$_GET["entxt"];
echo $entxt;
$x = new fanyi($entxt,1);
echo $x->go();
class fanyi
{php同志湾
echo $entxt;
$x = new fanyi($entxt,1);
echo $x->go();
class fanyi
{php同志湾
<?php
$entxt=$_GET["entxt"];
echo $entxt;
$x = new fanyi($entxt;,1);
echo $x->go();
class fanyi
{
var $cilentID;
var $clientSecret;
var $authUrl;
var $scopeUrl;
var $grantType;
var $inputstring;
var $toLanguage;
var $fromLanguage;
function __construct($inputstring,$biao='0')
{这个不行
<?php
$entxt=$_GET["entxt"];
echo $entxt;
$x = new fanyi("hello baby",1);
echo $x->go();
class fanyi
{
var $cilentID;
var $clientSecret;
var $authUrl;
var $scopeUrl;
var $grantType;
var $inputstring;
var $toLanguage;
var $fromLanguage;
function __construct($inputstring,$biao='0')
{
多了个分号,造成语法错误不能解析,而你又屏蔽了错误提示,所以没能发现这个问题