我在Windows7(64位)上安装了xampp.我想使用PHP,Apache和MySql.服务器Apache和MySql服务在Xampp控制面板上正常运行.但是当我在我的网络浏览器上运行localhost时,它只显示连接.没有其他的.与之前的环境相比,它与IIS运行良好.
我正在尝试使用react-pdf呈现 pdf我面临的问题是我正在使用 URL 显示来自后端服务器的图像。但它在pdf中显示为空白。当我进一步调试时才知道,当我在突出显示的行上放置断点时,图像就会显示出来。从远程 URL 加载图像可能没有时间?
<Page size="A4" style={styles.page}>
{this.state.productsToBeExported.map((product) => {
const img = this.getImageSource(product);
//if breakpoint is added here then the images are displayed
return (
<View
key={product.productId}
style={styles.section}
>
<Image
style={{
width: imgWidth + "px",
border: "2pt solid #999898",
}}
src={img}
></Image>
</View>)
});
</Page>
//remote Image Url (Node server)
getImageSource(product) {
return `${URL}/${this.props.timestamp}/${product.productId}.jpg`;
}
Run Code Online (Sandbox Code Playgroud)
任何帮助将非常感激。
注意:这些图像是在后端即时生成的。所以我不能导入它们。
我对MongoDb有点新,我使用的是MongoDb v.2.4.问题在于,当我使用--auth参数运行mongod时,即使在验证后我也无法执行简单的操作,例如"show users".但是如果我在没有--auth参数的情况下运行mongod,那么工作正常.
> use admin
switched to db admin
> db.auth("dbadmin","mypassword")
1
> show users
**Thu Feb 27 16:50:17.695 error: { "$err" : "not authorized for query on admin.sys
tem.users", "code" : 16550 } at src/mongo/shell/query.js:128**
Run Code Online (Sandbox Code Playgroud)