草庐IT

FIELD_NAME

全部标签

php - 谷歌云端硬盘 API v3 : Invalid field selection

我正在使用GoogleDriveAPIv3访问有关驱动器的空间配额。而且,无论我做什么,我都会遇到这个错误:Fatalerror:Uncaughtexception'Google_Service_Exception'withmessage'Errorcalling**GEThttps://www.googleapis.com/drive/v3/about?fields=name**:(400)Invalidfieldselectionname'in/var/webs/includes/google-api-php-client/src/Google/Http/REST.php:110S

php - 严重性 : 8192 Message: Methods with the same name as their class will not be constructors in a future version of PHP;

严重性:8192消息:在未来的PHP版本中,与类同名的方法将不再是构造函数;CI_Pagination有一个已弃用的构造函数文件名:libraries/Pagination.php行号:27classCI_Pagination{var$base_url='';//Thepagewearelinkingtovar$total_rows='';//Totalnumberofitems(databaseresults)var$per_page=10;//Maxnumberofitemsyouwantshownperpagevar$num_links=2;//Numberof"digit"li

php - Magento : Category Name instead of category ids in category path.

我正在尝试根据magento中的产品ID在类别路径中获取类别名称。假设我的产品ID=1,并且我在其中定义了category5(id=5),并且我得到了类似2/3/5的类别路径。我需要像category2/category3/category5这样的类别路径,而不是这种类型的类别路径。这意味着我需要路径中的类别名称而不是类别ID。我通过使用以下代码得到了这个但是它花费了很多时间。我需要减少处理时间。请就如何减少处理时间给我建议。$category_model=Mage::getModel('catalog/category');$product_model=Mage::getModel(

php - 教义 - [语义错误] - 错误 : Class has no field or association

我正在尝试使用Doctrine的DQL运行查询在存储库中,我收到以下错误:QueryExceptioninQueryException.phpline63:[SemanticalError]line0,col100near'test_suite_id':Error:ClassApplication\Model\Entity\Pagehasnofieldorassociationnamedtest_suite_id协会一个User可以有多个TestSuite。一个TestSuite可以有多个Page。因此,我在User和TestSuite以及TestSuite和Page分别。以下是我的实

php - Symfony/Doctrine "refers to the owning side field which does not exist"- 但类中存在属性

SeUserProgress和SeUser。SeUserProgress表为每个用户保存多个条目。这通过以下两个映射表示。类:SeUserProgress/***@ORM\ManyToOne(targetEntity="SeUser",inversedBy="progress")*@ORM\Column(name="user_id",type="integer",nullable=true)*/private$user;类别:SeUser/***@ORM\OneToMany(targetEntity="SeUserProgress",mappedBy="user")*/private$

php - Magento : Get country code by country name

我试图通过国家名称查找国家代码。所以,例如,我有“荷兰”,我需要得到“NL”我知道有一种方法可以找到名称形式的代码:$country_name=Mage::app()->getLocale()->getCountryTranslation($country_code)但我需要反之亦然。那么Magento中有什么方法可以解决吗? 最佳答案 Fromtheotherquestion,这只能通过循环国家集合来完成$countryId='';$countryCollection=Mage::getModel('directory/count

php - 将 basename 函数与 $_FILES ['userFile' ] ['name' ] 一起使用不是多余的吗?

根据thePOSTmethoduploadssection的thePHPManual,$_FILES['userfile']['name']是客户端机器上文件的原始名称。该部分中的示例#2使用basename使用$_FILES['userfile']['name']的函数如下所示:$uploaddir='/var/www/uploads/';$uploadfile=$uploaddir.basename($_FILES['userfile']['name']);我在本地主机(Apache2.2.14、PHP5.3.1、WindowsXP)上做了一些实验,发现以下两行是等价的:$_FIL

php - 如何解决curlexception 6 : name lookup time out error in facebook new graph api的问题

您好,我正在使用新的图形API在facebook上创建应用程序,但它给出了错误curlexception6:在facebook.php文件中查找名称超时。问题是相同的代码在其他服务器上运行良好,不会出现此错误。如何解决此错误请帮助我。 最佳答案 我在虚拟机上本地开发时遇到了同样的问题。我通过提高Curl连接超时解决了这个问题。在您的FacebookSDK中查找CURLOPT_CONNECTTIMEOUT=10。尝试将其更改为CURLOPT_CONNECTTIMEOUT=30或CURLOPT_CONNECTTIMEOUT=60

php - Drupal 7 使用 field_view_value() 获取预告片

我有一个Ajax处理程序脚本,我在其中加载$nodeId并在默认(完整)View中输出结果:$node=node_load($input);$prerendered_node=node_view($node,'default');...现在我还需要显示预告片(摘要或修剪)。到目前为止我试过了,没有成功(内容中填写了摘要):1.$item=$node->body['en'][0];$output=field_view_value('node',$node,'body',$item,'Teaser');echo$output;(blank)2.echo$node->body['eng'][

html - 当它因 'htmlParseEntityRef: no name' 错误而失败时如何加载 HTMLFile()?

我正在尝试从以下位置获取字符串“hinsonlouann”:hinsonlouann当我运行以下命令时:$html="http://gisapps.co.union.nc.us/ws/rest/v2/cm_iw.ashx?gid=12339";$doc=newDOMDocument();$doc->loadHTMLFile($html);$xpath=newDOMXpath($doc);$elements=$xpath->query("*/div[@class='owner-name']");if(!is_null($elements)){foreach($elementsas$ele