为什么.htaccess和.htpasswd不接受我的登录信息?
我从中获取了完整的路径信息 phpinfo()
我的根的完整路径: /home/userid/public_html
我把我的.htpasswd放到根文件夹(public_html)中,这是我的.htpasswd的完整路径: /home/userid/public_html/.htpasswd
我想通过密码保护的管理员文件夹名称: adminfolder
我把我adminfolder放到根文件夹(public_html)
文件夹结构
public_html
---- .htaccess {permission: -rw-r--r--}
---- .htpasswd {permission: -rw-r--r--}
---- adminfolder {permission: drwxr-xr-x}
---- ---- .htaccess {permission: -rw-r--r--}
---- ---- other secret files {permission: -rw-r--r--}
Run Code Online (Sandbox Code Playgroud)
AuthUserFile /home/userid/public_html/.htpasswd
AuthName "Log In"
AuthType Basic
Require valid-user
Run Code Online (Sandbox Code Playgroud)
注意:这是我的原始密码的加密版本.
admin:zv.sqVSz3W1nk
Run Code Online (Sandbox Code Playgroud)
RewriteEngine On
RewriteBase /
#always use www - redirect non-www to www permanently
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTPS}s on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] …Run Code Online (Sandbox Code Playgroud) 我会根据52framework.com提供的内容进行调整.(HTML5,CSS3,JS框架)尽管观看网格教程视频并检查其他演示源代码,但我无法理解为什么框架<div class="clear"></div><!-- clear -->在第12行使用代码.
以下代码的地址是:http://demo.52framework.com/demos/framework/grid.html
<body>
<div class="row">
<header>
<div class="logo col_7 col">52framework</div><!-- logo col_7 -->
<nav class="col_9 col">
<ul>
<li><a href="#navigation">navigation 1</a></li>
<li><a href="#navigation">navigation 2</a></li>
<li class="last"><a href="http://www.enavu.com">enavu network</a></li>
</ul>
</nav><!-- nav col_9 -->
<div class="clear"></div><!-- clear -->
</header>
</div><!-- row -->
...
Run Code Online (Sandbox Code Playgroud)
下面的代码也来自同一个源代码,但是你看到<div class="clear"></div><!-- clear -->这里没有使用代码段,即使这里已经完成了更多的分区.
<!-- this section shows off the grid and how it can be used -->
<section class="row" id="grid">
<h2>Grid Framework</h2> …Run Code Online (Sandbox Code Playgroud) 我有这样的表结构:
TABLE NAME : counter
id | datetime | url | ip
-------------------------------------------
1 |2013-04-12 13:27:09 | url1 | ip01
2 |2013-04-13 10:55:43 | url2 | ip02
3 |2013-04-14 11:14:12 | url1 | ip03
4 |2013-04-15 23:23:55 | url2 | ip04
5 |2013-05-02 08:34:44 | url1 | ip03
Run Code Online (Sandbox Code Playgroud)
通过智能SELECT查询,我想获取3列:
Distinct URL | count of ip | count of distinct ip
| for each distinct url | for each distinct url
-------------------------------------------------------------------
url1 | 3 | 2
url2 | … 我的输出在下面的代码之后是:" PHP Fatal error: Class 'Collator' not found".
我在php手册中读过COLLATOR class,PHP版本需要PHP 5> = 5.3.0.我的PHP版本是5.3.24.
在我phpinfo()搜索'coll'字符串但没有找到任何内容.
另请注意,我的网站lang是土耳其语,我正在使用 UTF-8
那么我的致命错误输出的原因是什么?谢谢.
/* fetch values */
$etiket_bulutu = '';
while ($beyan->fetch())
{
$etiket_bulutu .= $tags.', ';
}
$etiket_bulutu = substr_replace($etiket_bulutu ,'',-2); //omit last {, } chars
$etiketler = explode(", ", $etiket_bulutu); //get each tag as arr
$etiketler = array_unique($etiketler);
$etiketler = array_values($etiketler); //only unique tags without NULLs
$etadet = count($etiketler);
$coll = collator_create('tr_TR'); //from http://www.php.net/manual/en/collator.sort.php
collator_sort($coll, $etiketler);
for($x=0;$x<$etadet;$x++) …Run Code Online (Sandbox Code Playgroud) 对于PHP错误处理,目的是"只有管理员才能看到警告,错误等";
我应用了以下步骤:
error_reporting(-1);了我的命令index.php.htaccess这是刚下public_html的文件夹error_modes在我的public_html文件夹中创建了文件夹.htaccess文件error_modes夹中创建了文件error_modes文件夹的权限设置为777可写.<?php 'should see this error in log file' ?>在我的footer.inc.php页面写道.请注意,我最后没有写过;字符.尽管我的页面中有意PHP语法错误footer.inc.php,但没有php_error.log创建文件!
我看到应该看到日志文件中的这个错误 string打印在我的footer.inc.php页面中.因此,尽管语法错误,PHP仍然有效!
我还在.htaccess下面添加了我的整个代码.(这是刚刚下的那个public_html)
fyi:我没有访问权限,php.ini也没有任何预设.log文件.PHP版本是5.4.
你能纠正我吗?谢谢.最好的祝福.
php_flag log_errors on
php_flag display_errors off
php_value error_log /home/my_user_number/public_html/error_modes/php_error.log
php_value error_reporting …Run Code Online (Sandbox Code Playgroud)