为什么我的“数据库插入”不能在生产中使用?

编程入门 行业动态 更新时间:2024-10-23 22:28:41
本文介绍了为什么我的“数据库插入”不能在生产中使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我将我的网络应用程序从开发(本地计算机)移动到生产(Web服务器),我插入数据库的脚本不能正常工作。 这是脚本:

展开 | 选择 | Wrap | 行号

解决方案

它可能是。你需要开始调试。

他应该如何开始调试? @OP它是否适用于你的测试环境?两个环境是否相同?你有相同版本的PHP和MySQL吗?服务正在运行吗?

这很尴尬。 我连接的是错误的数据库。所以,是的,解决了这个问题。 但是,虽然我从数据库中读取数据,但我无法获得插入。我几乎肯定它应该有效。我甚至在执行insert语句后添加一行显示错误消息,但浏览器直接通过它。它将图像插入到它应该的目录中,然后显示javascript警报,然后继续数据库插入,运行到javascript重定向并转到它应该的页面。所以,除了当我检查数据库并且应该插入的值实际上不在那里时,一切似乎都在工作。 无法理解。

I moved my web app from development (local machine) to production (web server) and the script I have that inserts to the database won''t work. This is the script:

Expand|Select|Wrap|Line Numbers

解决方案

it could be. you?ll need to start debugging.

And how should he "start debugging"? @OP did it work in your test environment? Are the two environments the same? Do you have the same version of PHP and MySQL? Are the services running?

This is embarrassing. I was connecting to the wrong database. So, yeah, fixed that problem. However, although I''m getting the read from the database, I can''t get the insert. I''m almost sure it should work. I even put a line to display an error message after the execution of the insert statement, but the browser goes straight past it. It''s inserting the image to the directory it''s supposed to, then displays the javascript alert, then goes on the databse insert, runs past that to the javascript redirect and goes to the page it''s supposed to. So, everything seems to be working except for when I check the database and the values that were supposed to be inserted are not actually in there. Can''t figure it out.

更多推荐

为什么我的“数据库插入”不能在生产中使用?

本文发布于:2023-11-16 07:41:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1602319.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:能在   数据库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!