草庐IT

move_pages

全部标签

php - Laravel 应用程序显示文件列表而不是 "Hello Page"

我刚刚开始使用Laravel5,但我还无法显示经典的Hello页面;我只看到我的应用程序文件列表。我尝试过更改.htaccess文件、清除缓存、创建新应用程序,但都无济于事。我知道PHP在我的服务器上运行良好,似乎只有这个Laravel应用程序无法处理它。这似乎我错过了一些明显的东西,但我不知道我应该问什么。这里有一张截图来展示我所看到的:这是我用来创建应用程序的命令$laravelnewm6g我正在使用普通apache2(未使用mamp设置)的Mac上工作 最佳答案 您是否尝试过从终端安装您的应用程序?首先,使用cd和在终端上转到

php - 将文件 'move' 放入包含路径列表是什么意思?

在《ZendFramework,aBeginner'sguide》一书中;它说:library/目录的内容应该移动到你的PHP“include”中的一个位置路径”列表。我不明白。不包括在特定位置引用特定目录的路径保留值。是这个意思吗?还是我必须将文件夹移动到“包含路径”中已经提到的位置? 最佳答案 PHP的include_path与系统的PATH环境变量作用相同:"Itdefinesalistofdirectoriestosearchthroughwhenlookingforacommandtoexecute."(BobRankin

php - 获取错误 "Below is a rendering of the page up to the first error."

我正在使用XMLWriter创建xml。下面是我的代码,它运行良好。openMemory();$writer->startDocument('1.0');$writer->setIndent(4);$writer->startElement('epp');$writer->startElement("command");$writer->startElement("login");$writer->writeElement('clID','hello');//username$writer->writeElement('pw','abcdefg');//password$writer-

javascript - PHP Javascript : Keeping radio buttons selected on page refresh

我有响应式css选项卡,我用它来以优雅的方式显示信息,但是当用户刷新页面时,它会返回到第一次检查的输入。我想知道如何让页面上的用户按钮保持选中状态,刷新他之前选择的按钮。我写了一个脚本,但它似乎不起作用。标签InboxImportantBin脚本$(document).ready(function(){$('.inputabsinput[type="radio"]').each(function(){$(this).attr("checked",$(this).checked());}); 最佳答案 以下是否符合您的要求:$(doc

php - 警告 : move_uploaded_file() failed to open stream

我正在尝试通过ftp上传文件。这是我的代码$jname="AccountsofBiotechnologyResearch";if(!is_dir('/Trade/upload/'.$jname)){mkdir('/Trade/upload/'.$jname);//line63}move_uploaded_file($_FILES["submission_file"]["tmp_name"],"/Trade/upload/$jname/".$dup_name);//line67Trade是public_html文件夹中的一个文件夹。当我上传一个文件时,它会给我一个警告,比如,Warnin

PHP : add write permission to file after move_uploaded_file()

用PHP上传图像后,我想使图像文件可写,以便为其添加水印。以下是我使用的代码:if(isset($_FILES['file_poster']['tmp_name'])&&$_FILES['file_poster']['tmp_name']!=''){$random_filename=substr(md5(time()),0,9);$ext='.jpg';if(strpos(strtolower($_FILES['file_poster']['name']),'.png')>-1){$ext='.png';}move_uploaded_file($_FILES['file_poster'

php - 谷歌搜索 : Scrape results page in PHP for total results

是否可以使用PHP抓取Google搜索结果页面以提取找到的搜索结果总数?如果是这样,我该怎么做呢?谢谢 最佳答案 尝试使用phpsimplehtmlparser$search_query='google';$url=sprintf('http://www.google.com/search?q=%s',$search_query);$html=file_get_html($url);$results=$html->find('#resultStats/b',2)->innertext;echosprintf('Googlefound

php - 使用 fwrite() 还是 move_uploaded_file() 更好?

这更像是一个编码标准问题。如果我可以称其为在文件上传处理程序脚本中使用它“更好”,那是哪一个?我知道fwrite()及其附带的读写方法可以分块进行,但使用move_uploaded_file()是更优雅和更短的代码。谢谢 最佳答案 使用move_uploaded_file()。它会进行额外的检查以确保用户不会从事任何有趣的业务。此外,使用fread()和fwrite()复制文件,而不是移动,这是一个比仅仅移动它(基本上只是更改它的名称,假设源和目标位于同一分区上)的成本要高几个数量级。

php - 拉维尔 4 : Two different view pages for a single URI based on auth status

我最近开始使用Laravel4进行开发,我对路由有疑问。对于“/”,我希望根据用户的授权状态有两个不同的View页面。如果用户已登录并正在查看“/”,我想向他们展示一个带有管理控件的View,当用户在未登录的情况下以普通用户的身份查看“/”时,我想提供一个一般信息View。为了实现这一点,我一直在尝试使用过滤器“auth”和“guest”,但没有成功。//应用程序/routes.php//routeforloggedinusersRoute::get('/',array('before'=>'auth',function(){return'loggedin!';}));//fornor

php - move_uploaded_file 无法打开流和权限被拒绝错误

我正在尝试上传文件,但我的浏览器出现以下错误:Warningmove_uploaded_file(public/upload/udesignwptheme138.zip)[function.move-uploaded-file]:failedtoopenstream:Permissiondeniedin/home/monivbr/public_html/classes/system/Util.phponline1803Warning:move_uploaded_file()[function.move-uploaded-file]:Unabletomove'/tmp/phpJtBlbi