草庐IT

it_works

全部标签

PHP :Why PHP-Curl is not working with nginx

我最近将我的网站移到了nginx服务器上。我的python代码在同一台机器上的8086端口上运行,但我的phpcurl模块不工作。我不知道我在这里做错了什么。我已经安装了php5-fpm,但仍然无法解决这个问题。我也看不到错误,因为nginx只显示空白屏幕。顺便提一句。它在curl_init()语句之前打印所有值。我也可以发布我的Nginx配置,但我认为这不是必需的。 最佳答案 你需要运行/etc/init.d/php5-fpmrestart 关于PHP:WhyPHP-Curlisnot

php - 如何删除 https ://from URL and insert http://instead of it in string in PHP?

首先,我需要检查URL字符串,如果URL的协议(protocol)是https,那么我需要替换PHP中的http。所以这个php函数的输入和输出必须是这样的:Input->https://example.com/example/https.phpOutput->http://example.com/example/https.phpInput->http://example.com/example/https.phpOutput->http://example.com/example/https.php 最佳答案 这将确保它位于字符

php - 奇怪的 PHP 错误 : function not recognizing its own parameter

我有以下功能:publicfunctionupdateCustomerInternetBanking($value,$column_to_go_by){$sql="UPDATEcustomercJOINaccount_importaiONc.account_import_id=ai.idJOINgeneric_importgiONai.generic_import_id=gi.idJOINimport_bundleibONgi.import_bundle_id=ib.idSEThas_internet_banking=1WHEREc.".$column_to_go_by."=".$th

php - 当 Firefox 显示 "the Image cannot be displayed because it contains errors"时,我如何找出错误是什么?

我有一个制作图像的PHP文件。我将PHP配置为在屏幕上报告错误。当我在Firefox23中运行PHP文件中的文件时,它返回TheImagecannotbedisplayedbecauseitcontainserrors。我如何找出图像中的特定错误?代码如下:0)and(!$xend)){$y=0;while(($y1andfunction_exists('imagesetbrush')){$brush=imagecreatetruecolor($brushsize,$brushsize);imagefill($brush,0,0,$noisecol);imagesetbrush($im

PHP/图形 API : Why my facebook session doesn't work's?

我是FacebookGraphAPI的新开发者。我已经按照本教程进行操作:https://www.webniraj.com/2014/05/01/facebook-api-php-sdk-updated-to-v4-0-0.我测试过一次并且有效。我已经修改并重新测试,它的工作。但是,第二天,什么都没有...我的facebooksessiontoken发生了变化,我不知道为什么以及如何发生变化。这是我的代码://ALLincludesandvariables//startsessionsession_start();//initappwithappidandsecretFacebookS

php - 正则表达式(php 中的 preg_match): last groups in the output array don't work correctly

使用这种模式:(howis\s)?(the\s)?(weather)\s?((on)\s)?(today|tomorrow|sunday|monday|tuesday|wednesday|thursday|friday|saturday|sunday|thisweek)?(\s(in)\s(.*)\s?(on)?\s?(today|tomorrow|sunday|monday|tuesday|wednesday|thursday|friday|saturday|sunday|thisweek)?)?这就是我要捕捉的东西输入:维也纳星期二的天气怎么样输出:array(100=>howis

php - 有没有像 smush.it 这样的 php 脚本来优化我网站上的本地镜像?

我已经看到可以使用smush.it为您的网站优化图像的功能,但它们仍然调用实际的yahoosmushit服务器。有没有类似这样的脚本,我可以在本地安装以在用户上传图像后压缩图像。 最佳答案 如果您使用的是linux机器,则有http://sourceforge.net/projects/littleutils/提供包括几个基本的文件属性查询实用程序。包括几个文件重命名实用程序。包括几个无损图像文件再压缩器。包括几个压缩文件再压缩器。包括重复文件查找实用程序。包括一个安全的临时文件创建实用程序。如果您运行的是wordpress,甚至还

php - Laravel5.2 调度 :run don't work with cron job

我在使用phpartisanschedule:run时遇到问题。我在GoDaddy上有以下cron作业:/usr/bin/php/home/usr/framework/artisanschedule:run>>/dev/null2>&1每次,我都会收到此错误消息:local.ERROR:exception'ErrorException'withmessage'Invalidargumentsuppliedforforeach()'in/home/usr/framework/vendor/symfony/console/Input/ArgvInput.php:286Stacktrace:

php - 应避免使用 "Imagick::flattenImages method is deprecated and it' s”

我不能使用flatternImages()函数,因为它已被弃用。我必须使用$im->setImageAlphaChannel(\Imagick::ALPHACHANNEL_REMOVE);$im->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN);但是ALPHACHANNEL_REMOVE常量未定义。我该如何解决这个问题?附言我尝试使用11代替\Imagick::ALPHACHANNEL_REMOVE并得到错误:"Unabletosetimagealphachannel" 最佳答案 根据

php - Zend : Cannot get router working from Bootstrap. php

Zend新手,遇到路由问题。我可以使用application.ini文件使路由正常工作,但似乎无法使用Bootstrap使路由正常工作。我看过不少教程,但大多数似乎都适用于旧版本的ZendFramework。我正在使用1.10。在我的Bootstrap中我有:classBootstrapextendsZend_Application_Bootstrap_Bootstrap{protectedfunction_initRouter(){$frontController=Zend_Controller_Front::getInstance();$router=$frontControlle