MySQL CLI Web 环境在/<unix> 上停止 [英] MySQL CLI web environment halts on /<unix>

查看:22
本文介绍了MySQL CLI Web 环境在/<unix> 上停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我只是做了一个关于符号的问题,但是,虽然符号现在可以正常工作,但 UNIX 命令仍然存在问题.

So I just made a question about symbols, but yeah, while the symbols are now working properly, there is still a problem with UNIX commands.

问题是,每当我输入一个以 / 开头并跟在 UNIX 命令之后的值时,主机都会响应 - 501 Method Not Implemented.

The thing is, whenever I input a value that starts with / and follows with a UNIX command, the host responds with - 501 Method Not Implemented.

这是什么原因造成的,如何防止这种情况发生,我认为这是因为 CLI 环境中的 MySQL 导致的吗?

What causes this, how to prevent this, and am I right that this happens because of MySQL in CLI environment?

是的,这里的拉脱维亚货币是Lats",缩写为Ls",我们的客户倾向于使用单独的值,例如学生 3 卢比,退休人员 2 卢比/儿童 1 卢比".而 /Ls 在那里搞砸了.

Yes, here in Latvia currency is "Lats", abbreviated to "Ls" and our client tend to seperate values like - "Ls 3 for students, Ls 2 for retirees /Ls 1 for children". And the /Ls there screws it all up.

提前致谢!

推荐答案

http://php.net/manual/en/function.escapeshellcmd.php

但是,如果您通过命令行将查询传递给 Mysql,那么您的做法肯定是非常非常错误的.PHP 中的 mysql 函数通过套接字(unix-domain 或 TCP)直接与数据库通信.任何地方都不应该在该过程中涉及 shell/命令行.

However, if you're passing queries to Mysql via a command line, then you're defniitely doing it VERY VERY wrong. The mysql functions in PHP communicate directly with the database via sockets (either unix-domain or TCP). There should NEVER be a shell/command line involved in the process anywhere.

这篇关于MySQL CLI Web 环境在/<unix> 上停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆