在本文中,我们将详细介绍PHP5.3.2的Silex问题?的各个方面,并为您提供关于php5.4的相关解答,同时,我们也将为您带来关于.net–如何解决这个烦人的WiX问题?、ajax+php做的se
在本文中,我们将详细介绍PHP 5.3.2的Silex问题?的各个方面,并为您提供关于php 5.4的相关解答,同时,我们也将为您带来关于.net – 如何解决这个烦人的WiX问题?、ajax+php做的search,显示和关闭的问题?_PHP教程、Flex问题、FLEX问题解析链接的有用知识。
本文目录一览:PHP 5.3.2的Silex问题?(php 5.4)
我尝试了Silex中的示例,并将我的控制器放在一个单独的目录和类中.
默认情况下,控制器方法不会传递Request和Application对象.这适用于我的开发机器,它有5.3.14但不是默认的Ubuntu 5.3.2.它给了我:
PHP Catchable Fatal error: Argument 1 passed to Sv\Controller\Index::index() must be an instance of Symfony\Component\HttpFoundation\Request, none given, called in /site/include/app/bootstrap.PHP on line 23 and defined in /site/include/app/Sv/Controller/Index.PHP on line 46
这是我的引导程序PHP:
<?PHP require_once __DIR__ . '/../vendor/autoload.PHP'; use Sv\Repository\PostRepository; use Sv\Controller; $app = new Silex\Application(); // define global service for db access $app['posts.repository'] = $app->share( function () { return new Sv\Repository\PostRepository; }); // register controller as a service $app->register(new Silex\Provider\ServiceControllerServiceProvider()); $app['default.controller'] = $app->share(function () use ($app) { return new Controller\Index(); }); $app['service.controller'] = $app->share(function () use ($app) { return new Controller\Service($app['posts.repository']); }); // define routes $app->get('/', 'default.controller:index'); $app->get('/next', 'default.controller:next'); $service = $app['controllers_factory']; $service->get('/', "service.controller:indexJsonAction"); // mount routes $app->mount('/service', $service); // deFinitions $app->run();
@H_301_17@这是控制器代码:
namespace Sv\Controller; use Silex\Application; use Symfony\Component\HttpFoundation\Request; class Index { public function index(Request $request, Application $app) { return 'Route /index reached'; } public function next(Request $request, Application $app) { return 'Route /next reached'; } }
@H_301_17@为什么这不起作用?
我希望这不是阻止我在PHP 5.3.2下使用ZF2的问题…
解决方法:
Silex需要PHP 5.3.3,如您在their
composer.json
中所见:"require": { "PHP": ">=5.3.3", ...
@H_301_17@它还在README file中说明:
Silex works with PHP 5.3.3 or later.
这是因为Symfony2不再支持PHP 5.3.2.
.net – 如何解决这个烦人的WiX问题?
Error 95 The component ‘blahblah’ has a key file with path
‘TARGETDIR\blah.dll’. Since this path is not rooted in one of the
standard directories (like ProgramFilesFolder),this component does
not fit the criteria for having an automatically generated guid.
(This error may also occur if a path contains a likely standard
directory such as nesting a directory with name “Common Files” under
ProgramFilesFolder.)
但我想要一个自动生成的GUID,我不想将TARGETDIR设置为由ProgramFilesFolder组成的其他路径,因为我在UI中设置了TARGETDIR,我甚至允许用户更改它以便人们可以指定他们想要安装应用程序的路径……有人如何获得此功能?可能吗?我的意思是,我能否拥有两全其美的优势?为什么这么重要? WiX有时太严格了……
解决方法
ajax+php做的search,显示和关闭的问题?_PHP教程
ajax+php做的search,显示和关闭的问题?
我用ajax+php作了个简易的类似于google search的搜索,当我没输入字母的时候,显示是这样的,1.jpg:
当我输入字母时显示是,2.jpg的效果。
请问大家,当我鼠标点击别处时,使弹出的search的那个框自动关闭,应如何修改,代码如下
var xmlHttp
function showResult(str)
{
if (str.length==0)
{
document.getElementById("livesearch").
innerHTML="";
document.getElementById("livesearch").
style.border="0px";
return
}
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
}
var url="suggest_list.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("livesearch").
innerHTML=xmlHttp.responseText;
document.getElementById("livesearch").
style.border="1px solid #999999";
}
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
立即学习“PHP免费学习笔记(深入)”;
Flex问题
< ! --每个精品软件-- >
<mx:Canvas xmlns:mx = "http://www.adobe.com/2006/mxml"
width = "950"
height = "560"
xmlns:phoneBusinesses = "leo.view.phoneBusinesses.*">
< mx:Script >
<![CDATA[
import mx.events.EffectEvent;
public static const DESTROYED:String="destroyed";
private var _myData:Object;
private var flag:String;
[Bindable]
/** 每个精品软件XML数据:【software.xml】.software.Item[index] */
public function get myData():Object {
return _myData;
}
public function set myData(value:Object):void {
_myData=value;
}
private function closeBtnClicked(event:MouseEvent):void {
destroy();
}
public function destroy():void {
flag="destroy";
thisContainer.visible=false;
}
private function faded(event:EffectEvent):void {
if(flag=="show") {
//
} else if(flag=="destroy") {
thisContainer.removeAllChildren();
this.removeAllChildren();
dispatchEvent(new Event(DESTROYED));
}
}
]]>
</mx:Script>
<mx:Fade id = "fadeIn"
duration = "2000"
alphaFrom = "0"
alphaTo = "1"/>
<mx:Fade id = "fadeOut"
duration = "2000"
alphaFrom = "1"
alphaTo = "0"/>
<mx:Canvas id = "thisContainer"
visible="false"
width = "100%"
height = "100%"
showEffect = "fadeIn"
hideEffect = "fadeOut"
effectEnd = "faded(event)">
<mx:Canvas id = "bg"
width = "100%"
height = "100%"
backgroundAlpha = "0.5"
backgroundColor = "0x000000">
< ! --背景图片-- >
<mx:Canvas id = "imgBg"
width = "517"
height = "529"
horizontalCenter = "0"
verticalCenter = "0"
styleName = "softwareItemContent">
< ! --精品软件名称-- >
<mx:Text id = "titleText"
x = "17"
y = "7"
width = "300"
color = "#000000"
fontSize = "14"
text = "{myData.title}"/>
< ! --参数(左上角)-- >
<phoneBusinesses:SoftwareItemParams x = "10"
y = "40"
myData = "{myData}"/>
< ! --下载到手机(右上角)-- >
<phoneBusinesses:DownloadToPhone id = "DownloadToPhone"
x = "337"
y = "39"
myData = "{myData}"/>
<mx:Text x = "20"
y = "165"
color = "#000000"
fontSize = "13"
text = "应用介绍"/>
< ! --应用说明(下方)-- >
<phoneBusinesses:SoftwareItemIntroduction x = "10"
y = "190"
myData = "{myData}"/>
<mx:Button id = "closeBtn"
right = "15"
top = "7"
label = "×"
click = "closeBtnClicked(event)"
color = "#FF0000"
fontSize = "12"/>
</mx:Canvas>
</mx:Canvas>
</mx:Canvas>
</mx:Canvas>
FLEX问题解析链接
1.Flex应用BlazeDS时报错:[RPC Fault faultString="发送失败" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed
2.Flex 迷你教程 — 在AdvancedDataGrid中合并单元格 (合并行) http://bbs.airia.cn/thread-9262-1-1.html
3.Flex中如何将XML数据显示在DataGrid控件中的例子 http://blog.minidx.com/2008/04/22/760.html
4.Flex中通过调用setClipboard将DataGrid数据复制到剪贴板便于导出Excel的代码 http://blog.minidx.com/2008/07/23/1122.html
今天关于PHP 5.3.2的Silex问题?和php 5.4的分享就到这里,希望大家有所收获,若想了解更多关于.net – 如何解决这个烦人的WiX问题?、ajax+php做的search,显示和关闭的问题?_PHP教程、Flex问题、FLEX问题解析链接等相关知识,可以在本站进行查询。
本文标签: