草庐IT

url_address

全部标签

php - 从 codeigniter url 中删除 index.php

我是codeigniter的新手。我在localhost/path/learn_ci安装了我的codeigniter。我已遵循codeigniterwiki中给出的所有步骤。这是我的.htaccess文件。RewriteEngineOnRewriteCond%{REQUEST_FILENAME}!-fRewriteCond%{REQUEST_FILENAME}!-dRewriteRule^(.*)$/learn_ci/index.php/$1[L]ErrorDocument404/index.php我还根据需要更改了配置文件。但是当我尝试访问我得到这个错误"TherequestedUR

php - 只允许 PHP 脚本打开像 www.mydomain.com/topsecret/1/001.jpg 这样的 url

我运行一个网络应用程序,我将用户上传的文件存储在如下文件夹结构中:www.mydomain.com/uploads/topsecret/1/001.jpgwww.mydomain.com/uploads/topsecret/1/002.jpg现在,很容易猜出003.jpg和004.jpg的url...因此,我想限制用户只能访问www.mydomain.com/app/,而不能访问其他任何内容。只有我在本地主机上的.php页面才可以访问绝密pdf,例如show.php:";}?>或许可以通过.htaccess或文件夹权限找到解决方案。我知道我可以通过“headers”和“readfile

PHP header : Content-disposition: attachment , 然后位置:一些 url

我的目标是在浏览器发出附件下载后将浏览器重定向到新页面。header("Content-type:text/csv");header("Cache-Control:no-store,no-cache");header("Content-disposition:attachment;filename=file.csv");//csvoutputlogichere//forwardtonextpageheader("Location:$url");这可能吗?UPDATE:以上结果CSV的最后一行显示PHP错误:Cannotmodifyheaderinformation-headersalr

php - 如何在 URL 中使用带有非英文符号的 file_get_contents()?

当我尝试使用PHP的file_get_contents()函数访问非英语(Unicode)URL时出现此错误。网址是:http://ml.wikipedia.org/wiki/%E0%B4%B2%E0%B4%AF%E0%B4%A3%E0%B5%BD_%E0%B4%AE%E0%B5%86%E0%B4%B8%E0%B5%8D%E0%B4%B8%E0%B4%BF我遇到了这个错误:Warning:file_get_contents(http://ml.wikipedia.org/wiki/%E0%B4%B2%E0%B4%AF%E0%B4%A3%E0%B5%BD_%E0%B4%AE%E0%B5%

php - 您如何构造 URL 来访问 google docs/drive 文件夹?

我想知道如何制作rawrequesttoGoogledrive至accessapublicfolder.https://www.googleapis.com/drive/v2/files?q=0B-eVxZFKAu61TmFQUUFPbzBmVVU&key=__________但是,该URL给出了以下错误:{"error":{"errors":[{"domain":"global","reason":"invalid","message":"InvalidValue","locationType":"parameter","location":"q"}],"code":400,"mes

php - HTACCESS - 在 URL 中使用空格

我必须(想要;)在URL中使用空格。我通过htaccess制作“可爱”的URL:RewriteRule^StorageList.php/([a-zA-Z]+)/([0-9]+)/([0-9a-zA-Z%+-]+)$StorageList.php?type=$1&users_id=$2&parts_section=$3[L]但是当我转到StorageList.php/Point/21/FordFiesta时,我的脚本没有获取变量数据。 最佳答案 更改您的正则表达式以允许空格:RewriteRule^StorageList\.php/(

php - 如何在 codeigniter 中从根 URL 重定向到 Controller ?

我在以下URL下有主视图:http://wifi.pocc.cnst.com/cnst/#/mapboard/|root|cntrl|view|我的目标是当用户在浏览器中输入:http://wifi.pocc.cnst.com重定向到http://wifi.pocc.cnst.com/cnst/#/mapboard/自动我怎样才能做到这一点?谢谢, 最佳答案 你可能知道请求到Controller的映射是http://your.domain/index.php/controller/method/arg1/../argn而任何未提供c

php - 如何为 AWS S3 上的内容生成过期 URL

我想创建一个临时URL,供用户从我的awss3存储桶下载内容。是否有关于如何快速轻松地完成此操作的教程?我正在为我的服务器端代码使用php 最佳答案 此功能内置于S3及其PHPSDK中。http://docs.aws.amazon.com/aws-sdk-php/guide/latest/service-s3.html#creating-a-pre-signed-url//Getapre-signedURLforanAmazonS3object//$clientisaninstanceofAWSSDK'sS3Client$signe

php - 即将到来的 SHA-256 : Do I need to update my IPN listener that does not use a secure URL?

我目前只使用支付按钮,以及我从https://github.com/paypal/ipn-code-samples获得的IPNphp脚本日期为2014年11月10日。我的脚本只是在没有加密的情况下回传到www.paypal.com。加密是否成为强制性要求? 最佳答案 您的IPN监听器将负责接收PayPal回调并将它们发送到PayPal进行验证。在这一点上,您的服务器与PayPal端点之间的连接将需要使用SHA-2进行加密。所以从字面上看是的,您需要检查您的服务器keystore/信任库并确保它包含SHA-2兼容证书。你可以引用这个P

php - 在 PHP 中获取当前 Url 而不是文件根文件夹 url

你好friend我想获取当前页面Url而不是捕获文件的根url我想像这样捕捉http://localhost/tester/但是就这样来了http://localhost/tester/views/inc/readcountry.php我试过这样,但它正在返回$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]localhost/tester/views/inc/readcountry.php 最佳答案 这个比很多都工作得很好$_SERVER['QUERY_STRING']