小编Sar*_*CSE的帖子

有没有办法从php中包含文件跳过致命错误?

如果我在php中包含一个文件.如果该php中有任何致命错误,那么有没有办法跳过它.

<?php
   include "somefile.php";
   echo "OK"; // Is there any way to print this OK  If there is any fatal error on somefile.php
?>
Run Code Online (Sandbox Code Playgroud)

我需要包含这个somefile.php文件.它可能会返回某些主机的致命错误.我想跳过这个主机的文件.

请告诉我.

php fatal-error

7
推荐指数
1
解决办法
4680
查看次数

我如何在 vuejs 应用程序中设置动态基本 url?

我想用 vuejs 和 php 开发一个应用程序。可以安装在许多目录中,例如

https://example.com/path1/app,
https://example2.com/path1/p/app,
Run Code Online (Sandbox Code Playgroud)

我不想为每个子路径编译 vuejs 应用程序。我搜索了很多,但我找不到任何解决方案。

如何在 vuejs 2 中动态设置 vue js 公共路径? 我正在使用 @vue/cli 4.0.5 版本。我也试过使用

<base href="mybase path"/> // it works for my angular app
Run Code Online (Sandbox Code Playgroud)

请建议我如何动态地做到这一点?

请帮忙

vue.js vue-router vue-component vuex vuejs2

6
推荐指数
1
解决办法
8227
查看次数

为什么SQL显示MySQL错误?

为什么这个sql显示mysql错误?

DELETE FROM wp_comments
JOIN wp_commentmeta ON wp_comments.comment_id =wp_commentmeta.comment_id 
AND wp_commentmeta.meta_key = 'somekey'                        
AND wp_comments.comment_post_ID = '1'
Run Code Online (Sandbox Code Playgroud)

错误字符串

[Err] 1064 - You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version 
for the right syntax to use near 'INNER JOIN wp_commentmeta ON  
wp_comments.comment_id =wp_commentmeta.comment_id A' at line 2
Run Code Online (Sandbox Code Playgroud)

请告诉我.

mysql

2
推荐指数
1
解决办法
57
查看次数

如何在Wordpress插件开发中获得激活的插件列表?

有什么办法可以在wordpress Codex中获取所有已激活的插件列表

我用这个

get_option('active_plugins');
Run Code Online (Sandbox Code Playgroud)

这将返回插件文件路径。我要这个名字。因为有时文件名与实际的插件名不同。

php wordpress plugins codex

2
推荐指数
1
解决办法
3771
查看次数