我有一个奇怪的问题.我已经设置了XDebug来分析我们正在处理的PHP应用程序.我相信一切都设置正确但我运行时没有输出.我的配置如下所示:
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
[XDebug]
xdebug.profiler_append = 1
xdebug.profiler_enable = 0 (I've tried this both on and off)
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "/debug/xdebug/profiler_output_dir"
xdebug.profiler_output_name = "cachegrind.out.%p"
Run Code Online (Sandbox Code Playgroud)
所有phpinfo()
设置都应该匹配.输出目录的权限现在设置为777,所以我可以测试它.我也试过使用public_html下的目录,但没有运气.我用来启动探查器的URL是:
http://example.com/my_page.php?XDEBUG_PROFILE
-or-
http://example.com/my_page.php?XDEBUG_PROFILE=1
Run Code Online (Sandbox Code Playgroud)
两者都不起作用.任何帮助将不胜感激!!这个应用程序有5-6秒的页面加载时间,我无法通过代码跟踪它.
我正在尝试修复ASP Classic应用程序,当我尝试从Recordset对象创建一个数组时.但是,我不能让它正常工作.
这段代码给了我一条记录(最后一条),但据我所知,它是正确的:
Dim Products
Dim Products_cmd
Dim Products_numRows
Set Products_cmd = Server.CreateObject ("ADODB.Command")
Products_cmd.ActiveConnection = Conn
Products_cmd.CommandText = "SELECT prod_id, prod_description FROM dbo.products ORDER BY prod_description ASC"
Products_cmd.Prepared = true
Set Products = Products_cmd.Execute
Products_numRows = 0
Dim arrProducts()
arrProducts = Products.GetRows()
Run Code Online (Sandbox Code Playgroud)
使用此代码给我一个"下标超出范围:'UBound'
Dim Products
Dim Products_cmd
Dim Products_numRows
Set Products_cmd = Server.CreateObject ("ADODB.Command")
Products_cmd.ActiveConnection = Conn
Products_cmd.CommandText = "SELECT prod_id, prod_description FROM dbo.products ORDER BY prod_description ASC"
Products_cmd.Prepared = true
Set Products = Products_cmd.Execute
Products_numRows = 0
Dim …
Run Code Online (Sandbox Code Playgroud) 我正在编写用于外部应用程序的代码。我正在尝试使用 Microsoft Identity 2.0 和 ASP.NET MVC 5。我已经自定义了 UserViewModel 以保存 FirstName 和 LastName 以及一些其他参数。每当我注册用户时,它都会成功登录,但是当我尝试使用电子邮件/密码进行正常登录时。在SignInManager.PasswordSignAsync始终返回false。由于所有检查框架内部的代码,我正试图弄清楚如何调试这种情况。我将在这里提供一些代码来帮助任何愿意查看它的人。提前致谢!
这是微软在他们的示例中提供的通用登录功能。我没有改变那里的任何东西。但这是具有错误消息的函数。
public async Task<ActionResult> Login(LoginViewModel model, string returnUrl)
{
if (!ModelState.IsValid)
{
return View(model);
}
// This doesn't count login failures towards account lockout
// To enable password failures to trigger account lockout, change to shouldLockout: true
var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);
switch (result)
{
case SignInStatus.Success:
return RedirectToLocal(returnUrl);
case SignInStatus.LockedOut:
return View("Lockout");
case SignInStatus.RequiresVerification:
return RedirectToAction("SendCode", new { ReturnUrl …
Run Code Online (Sandbox Code Playgroud) 我正在研究一个文件管理器项目,似乎无法理解我只获取目录的递归目录列表.我尝试过的所有内容都会留下空的子目录,或者在我尝试将其解析为jQuery树的返回结构时无效.
我已经尝试过使用数组和递归迭代器,但到目前为止我没有任何工作.
**更新**
感谢大家的意见,我已将我的代码缩减为:
class image_management {
private $_user_id;
private $_user_name;
private $_user_path;
/**
* Constructor
*/
function __construct($user_id, $user_name) {
$this->_user_id = $user_id;
$this->_user_name = $user_name;
$this->_user_path = ORDER_ROOT.$this->_user_id;
}
/**
* Cleanup the class and close connections
*
*/
function __destruct() {
}
/**
* Get Image Folders
* Returns an HTML list of the folders under a users
* directory.
*
* @param hash $user_id -user id hash
* @param string $user_name - users email address
* …
Run Code Online (Sandbox Code Playgroud) 我是CodeIgniter的菜鸟,我正在试图找出我正在构建的应用程序的配置.我的设置有问题.
我在Windows上运行XAMPP并使用别名目录指向应用程序目录.换句话说:" http:// localhost/app_name / "指向应用程序的根目录.在我为mod_rewrite执行.htaccess之前,这一切似乎都运行良好.然后,每当我尝试去控制器时,我都会回到xampp root.
我的配置是:
目录
/app_root
/app_root/codeigniter // where code igniter is located.
/app_root/main // where the main app is located. It' the applications
// directory cut from code igniter and renamed.
Run Code Online (Sandbox Code Playgroud)
的.htaccess
<IfModule mod_rewrite.**so**>
RewriteEngine On
RewriteBase **/app_name/**
RewriteCond %{REQUEST_URI} ^codeigniter.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
Run Code Online (Sandbox Code Playgroud)
的index.php
$system_folder = "@codeigniter";
$application_folder = "main";
Run Code Online (Sandbox Code Playgroud)
APP_NAME /主/配置/ config.php中
$config['base_url'] = "http://localhost/app_name/"; …
Run Code Online (Sandbox Code Playgroud) 目前我有这样的网址
http://<client_name>.website.com/index.php?function_name&cat=32
Run Code Online (Sandbox Code Playgroud)
我想设置一些内容,以便我们的营销人员可以发布网址
http://<client_name>.website.com/<parent_category>/<category>
Run Code Online (Sandbox Code Playgroud)
"cat = XX"将仅生成最后一个<category>
.但营销部门希望在其广告系列中使用父类别.目前我们通过html根目录中的index.php传递所有URL(稍后这将变得很重要).
我尝试了几种解决方案,包括:
mod_rewrite - 这种方法的问题在于它变成了一个巨大的.htaccess文件,因为我们需要为每个类别编写规则.
RewriteMap - 这非常接近,因为我可以查询数据库来构建输出的映射文件.但是,我已经知道我们无法访问httpd.conf.
index.php文件 -我试图运行通过我们的index.php文件,它的工作原理,但不留网址在浏览器友好的搜索引擎优化目的的一切.
我希望有人有另一个可能会有所帮助的想法,我真的很感激.如果你有一个网络上的东西的参考,这将有助于这也是伟大的.
php ×4
.htaccess ×2
ado ×1
asp-classic ×1
codeigniter ×1
html ×1
mod-rewrite ×1
profiling ×1
seo ×1
vbscript ×1
xampp ×1
xdebug ×1