English 中文(简体)
如何与使用日食从php返回用户和机器人客户的数据等值?
原标题:How to do equal to data returned from php to android client using eclipse?

我用日蚀来解冻[ p p a Android app. 应用程序将用户名和密码发送到php (服务器侧面), 如果用户不存在, 它返回“ 未找到 ” 。

现在我不想使用json:-)

我的问题是, 我无法做EQQQUAL 重弦!!!!!

if(text=="not found") ShowMessage("Invalid user and password !!");

if(text==getResources().getString(R.string.wronguser))
    ShowMessage("Invalid user and password !!");

我尝试了... 等(..) 函数,但它不是工作...

当我把回信卷指派给文本视图时,它显示我“找不到”,所以为什么 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

我的php使用 UTF-8 编码... THANX:-)

最佳回答

在 Java 字符串中,应使用 . 等同 比较 。 ( 进行身份比较,而 . 等同 比较实际内容。 )

所以从改变开始

if (text=="not found") ...

if (text.equals("not found")) ...

If that doesn t seem 至 work, make sure the strings doesn t contain unexpected leading / trailing white-space. You may also want 至 ignore case:

if (text.trim().equalsIgnoreCase("not found")) ...
问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...