java155apk_【原创】浅谈 Android APK定点爆破

[Java] 纯文本查看 复制代码.class public Lcom/mayor/codeSig/CodeSigWindow;

.super Landroid/app/Activity;

.source "CodeSigWindow.java"

# instance fields

.field private csig:Ljava/lang/String;

.field editText:Landroid/widget/EditText;

.field private isNum:Z

.field private mLen:I

.field textView:Landroid/widget/TextView;

# direct methods

.method public constructor ()V

.locals 1

.prologue

.line 22

invoke-direct {p0}, Landroid/app/Activity;->()V

.line 26

const/4 v0, 0x1

iput-boolean v0, p0, Lcom/mayor/codeSig/CodeSigWindow;->isNum:Z

.line 27

const/16 v0, 0xa

iput v0, p0, Lcom/mayor/codeSig/CodeSigWindow;->mLen:I

.line 28

const-string v0, "#id12"

iput-object v0, p0, Lcom/mayor/codeSig/CodeSigWindow;->csig:Ljava/lang/String;

.line 22

return-void

.end method

.method private read()Ljava/lang/String;

.locals 7

.prologue

.line 101

:try_start_0

const-string v5, "code.ini"

invoke-virtual {p0, v5}, Lcom/mayor/codeSig/CodeSigWindow;->openFileInput(Ljava/lang/String;)Ljava/io/FileInputStream;

move-result-object v4

.line 102

.local v4, inputStream:Ljava/io/FileInputStream;

const/16 v5, 0x400

new-array v1, v5, [B

.line 103

.local v1, bytes:[B

new-instance v0, Ljava/io/ByteArrayOutputStream;

invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;->()V

.line 104

.local v0, arrayOutputStream:Ljava/io/ByteArrayOutputStream;

:goto_0

invoke-virtual {v4, v1}, Ljava/io/FileInputStream;->read([B)I

move-result v5

const/4 v6, -0x1

if-ne v5, v6, :cond_0

.line 107

invoke-virtual {v4}, Ljava/io/FileInputStream;->close()V

.line 108

invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->close()V

.line 109

new-instance v2, Ljava/lang/String;

invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

move-result-object v5

invoke-direct {v2, v5}, Ljava/lang/String;->([B)V

.line 110

.local v2, content:Ljava/lang/String;

invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;

move-result-object v5

.line 117

.end local v0 #arrayOutputStream:Ljava/io/ByteArrayOutputStream;

.end local v1 #bytes:[B

.end local v2 #content:Ljava/lang/String;

.end local v4 #inputStream:Ljava/io/FileInputStream;

:goto_1

return-object v5

.line 105

.restart local v0 #arrayOutputStream:Ljava/io/ByteArrayOutputStream;

.restart local v1 #bytes:[B

.restart local v4 #inputStream:Ljava/io/FileInputStream;

:cond_0

const/4 v5, 0x0

array-length v6, v1

invoke-virtual {v0, v1, v5, v6}, Ljava/io/ByteArrayOutputStream;->write([BII)V

:try_end_0

.catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1

goto :goto_0

.line 112

.end local v0 #arrayOutputStream:Ljava/io/ByteArrayOutputStream;

.end local v1 #bytes:[B

.end local v4 #inputStream:Ljava/io/FileInputStream;

:catch_0

move-exception v3

.line 113

.local v3, e:Ljava/io/FileNotFoundException;

invoke-virtual {v3}, Ljava/io/FileNotFoundException;->printStackTrace()V

.line 117

.end local v3 #e:Ljava/io/FileNotFoundException;

:goto_2

const-string v5, ""

goto :goto_1

.line 114

:catch_1

move-exception v3

.line 115

.local v3, e:Ljava/io/IOException;

invoke-virtual {v3}, Ljava/io/IOException;->printStackTrace()V

goto :goto_2

.end method

.method private save()V

.locals 6

.prologue

const/4 v5, 0x1

.line 86

iget-object v3, p0, Lcom/mayor/codeSig/CodeSigWindow;->editText:Landroid/widget/EditText;

invoke-virtual {v3}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

move-result-object v3

invoke-interface {v3}, Landroid/text/Editable;->toString()Ljava/lang/String;

move-result-object v0

.line 88

.local v0, content:Ljava/lang/String;

:try_start_0

const-string v3, "code.ini"

.line 89

const/4 v4, 0x0

.line 88

invoke-virtual {p0, v3, v4}, Lcom/mayor/codeSig/CodeSigWindow;->openFileOutput(Ljava/lang/String;I)Ljava/io/FileOutputStream;

move-result-object v2

.line 90

.local v2, outputStream:Ljava/io/FileOutputStream;

invoke-virtual {v0}, Ljava/lang/String;->getBytes()[B

move-result-object v3

invoke-virtual {v2, v3}, Ljava/io/FileOutputStream;->write([B)V

.line 91

invoke-virtual {v2}, Ljava/io/FileOutputStream;->flush()V

.line 92

invoke-virtual {v2}, Ljava/io/FileOutputStream;->close()V

:try_end_0

.catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1

.line 98

.end local v2 #outputStream:Ljava/io/FileOutputStream;

:goto_0

return-void

.line 93

:catch_0

move-exception v1

.line 94

.local v1, e:Ljava/io/FileNotFoundException;

new-instance v3, Ljava/lang/StringBuilder;

invoke-virtual {v1}, Ljava/io/FileNotFoundException;->getMessage()Ljava/lang/String;

move-result-object v4

invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

move-result-object v4

invoke-direct {v3, v4}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V

const-string v4, " "

invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v3

invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v3

invoke-static {p0, v3, v5}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

move-result-object v3

invoke-virtual {v3}, Landroid/widget/Toast;->show()V

goto :goto_0

.line 95

.end local v1 #e:Ljava/io/FileNotFoundException;

:catch_1

move-exception v1

.line 96

.local v1, e:Ljava/io/IOException;

new-instance v3, Ljava/lang/StringBuilder;

invoke-virtual {v1}, Ljava/io/IOException;->getMessage()Ljava/lang/String;

move-result-object v4

invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

move-result-object v4

invoke-direct {v3, v4}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V

const-string v4, " "

invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v3

invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v3

invoke-static {p0, v3, v5}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

move-result-object v3

invoke-virtual {v3}, Landroid/widget/Toast;->show()V

goto :goto_0

.end method

# virtual methods

.method public GetSR()Ljava/lang/String;

.locals 2

.prologue

.line 121

new-instance v0, Ljava/lang/StringBuilder;

invoke-virtual {p0}, Lcom/mayor/codeSig/CodeSigWindow;->GetStr()Ljava/lang/String;

move-result-object v1

invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

move-result-object v1

invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V

iget-object v1, p0, Lcom/mayor/codeSig/CodeSigWindow;->csig:Ljava/lang/String;

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v0

invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v0

invoke-virtual {p0, v0}, Lcom/mayor/codeSig/CodeSigWindow;->MD5(Ljava/lang/String;)Ljava/lang/String;

move-result-object v0

return-object v0

.end method

.method public GetStr()Ljava/lang/String;

.locals 4

.prologue

.line 55

const-string v2, "phone"

invoke-virtual {p0, v2}, Lcom/mayor/codeSig/CodeSigWindow;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v1

check-cast v1, Landroid/telephony/TelephonyManager;

.line 56

.local v1, tm:Landroid/telephony/TelephonyManager;

invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getDeviceId()Ljava/lang/String;

move-result-object v0

.line 57

.local v0, deviceId:Ljava/lang/String;

new-instance v2, Ljava/lang/StringBuilder;

invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

move-result-object v3

invoke-direct {v2, v3}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V

iget-object v3, p0, Lcom/mayor/codeSig/CodeSigWindow;->csig:Ljava/lang/String;

invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v2

invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v2

invoke-virtual {p0, v2}, Lcom/mayor/codeSig/CodeSigWindow;->MD5(Ljava/lang/String;)Ljava/lang/String;

move-result-object v2

return-object v2

.end method

.method public MD5(Ljava/lang/String;)Ljava/lang/String;

.locals 12

.parameter "str"

.prologue

.line 126

const/4 v5, 0x0

.line 129

.local v5, md5:Ljava/security/MessageDigest;

:try_start_0

const-string v9, "MD5"

invoke-static {v9}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;

:try_end_0

.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

move-result-object v5

.line 136

invoke-virtual {p1}, Ljava/lang/String;->toCharArray()[C

move-result-object v1

.line 137

.local v1, charArray:[C

array-length v9, v1

new-array v0, v9, [B

.line 139

.local v0, byteArray:[B

const/4 v4, 0x0

.local v4, i:I

:goto_0

array-length v9, v1

if-lt v4, v9, :cond_1

.line 143

invoke-virtual {v5, v0}, Ljava/security/MessageDigest;->digest([B)[B

move-result-object v6

.line 145

.local v6, md5Bytes:[B

new-instance v3, Ljava/lang/StringBuffer;

invoke-direct {v3}, Ljava/lang/StringBuffer;->()V

.line 146

.local v3, hexValue:Ljava/lang/StringBuffer;

const/4 v4, 0x0

:goto_1

array-length v9, v6

if-lt v4, v9, :cond_2

.line 155

invoke-virtual {v3}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

move-result-object v7

.line 156

.local v7, ret:Ljava/lang/String;

iget-boolean v9, p0, Lcom/mayor/codeSig/CodeSigWindow;->isNum:Z

if-eqz v9, :cond_0

.line 158

const/16 v4, 0x61

:goto_2

const/16 v9, 0x66

if-le v4, v9, :cond_4

.line 161

:cond_0

const/4 v9, 0x0

iget v10, p0, Lcom/mayor/codeSig/CodeSigWindow;->mLen:I

invoke-virtual {v7, v9, v10}, Ljava/lang/String;->substring(II)Ljava/lang/String;

move-result-object v9

.end local v0 #byteArray:[B

.end local v1 #charArray:[C

.end local v3 #hexValue:Ljava/lang/StringBuffer;

.end local v4 #i:I

.end local v6 #md5Bytes:[B

.end local v7 #ret:Ljava/lang/String;

:goto_3

return-object v9

.line 130

:catch_0

move-exception v2

.line 132

.local v2, e:Ljava/lang/Exception;

invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V

.line 133

const-string v9, ""

goto :goto_3

.line 141

.end local v2 #e:Ljava/lang/Exception;

.restart local v0 #byteArray:[B

.restart local v1 #charArray:[C

.restart local v4 #i:I

:cond_1

aget-char v9, v1, v4

int-to-byte v9, v9

aput-byte v9, v0, v4

.line 139

add-int/lit8 v4, v4, 0x1

goto :goto_0

.line 148

.restart local v3 #hexValue:Ljava/lang/StringBuffer;

.restart local v6 #md5Bytes:[B

:cond_2

aget-byte v9, v6, v4

and-int/lit16 v8, v9, 0xff

.line 149

.local v8, val:I

const/16 v9, 0x10

if-ge v8, v9, :cond_3

.line 151

const-string v9, "0"

invoke-virtual {v3, v9}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

.line 153

:cond_3

invoke-static {v8}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

move-result-object v9

invoke-virtual {v3, v9}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

.line 146

add-int/lit8 v4, v4, 0x1

goto :goto_1

.line 159

.end local v8 #val:I

.restart local v7 #ret:Ljava/lang/String;

:cond_4

new-instance v9, Ljava/lang/StringBuilder;

int-to-char v10, v4

invoke-static {v10}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;

move-result-object v10

invoke-direct {v9, v10}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V

invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v9

new-instance v10, Ljava/lang/StringBuilder;

add-int/lit8 v11, v4, -0x61

invoke-static {v11}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

move-result-object v11

invoke-direct {v10, v11}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V

invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v10

invoke-virtual {v7, v9, v10}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

move-result-object v7

.line 158

add-int/lit8 v4, v4, 0x1

goto :goto_2

.end method

.method public btn1_click(Landroid/view/View;)V

.locals 3

.parameter "view"

.prologue

.line 62

iget-object v1, p0, Lcom/mayor/codeSig/CodeSigWindow;->editText:Landroid/widget/EditText;

invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

move-result-object v1

invoke-interface {v1}, Landroid/text/Editable;->toString()Ljava/lang/String;

move-result-object v1

invoke-virtual {p0}, Lcom/mayor/codeSig/CodeSigWindow;->GetSR()Ljava/lang/String;

move-result-object v2

invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v1

if-eqz v1, :cond_0

.line 64

invoke-direct {p0}, Lcom/mayor/codeSig/CodeSigWindow;->save()V

.line 65

invoke-virtual {p0}, Lcom/mayor/codeSig/CodeSigWindow;->showMain()V

.line 81

:goto_0

return-void

.line 67

:cond_0

new-instance v1, Landroid/app/AlertDialog$Builder;

invoke-direct {v1, p0}, Landroid/app/AlertDialog$Builder;->(Landroid/content/Context;)V

.line 68

invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

move-result-object v0

.line 69

.local v0, dialog:Landroid/app/AlertDialog;

const-string v1, "\u6570\u636e\u9519\u8bef"

invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setTitle(Ljava/lang/CharSequence;)V

.line 70

const-string v1, "\u786e\u5b9a"

new-instance v2, Lcom/mayor/codeSig/CodeSigWindow$1;

invoke-direct {v2, p0}, Lcom/mayor/codeSig/CodeSigWindow$1;->(Lcom/mayor/codeSig/CodeSigWindow;)V

invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog;->setButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

.line 78

const-string v1, "\u5bf9\u4e0d\u8d77\uff0c\u60a8\u8f93\u5165\u7684\u6570\u636e\u6709\u8bef\uff01"

invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setMessage(Ljava/lang/CharSequence;)V

.line 79

invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

goto :goto_0

.end method

.method public btn2_click(Landroid/view/View;)V

.locals 0

.parameter "view"

.prologue

.line 50

invoke-virtual {p0}, Lcom/mayor/codeSig/CodeSigWindow;->finish()V

.line 51

return-void

.end method

.method protected onCreate(Landroid/os/Bundle;)V

.locals 3

.parameter "savedInstanceState"

.prologue

.line 32

invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

.line 33

const v0, 0x7f030022

invoke-virtual {p0, v0}, Lcom/mayor/codeSig/CodeSigWindow;->setContentView(I)V

.line 34

invoke-virtual {p0}, Lcom/mayor/codeSig/CodeSigWindow;->getWindow()Landroid/view/Window;

move-result-object v0

invoke-virtual {v0}, Landroid/view/Window;->getDecorView()Landroid/view/View;

move-result-object v0

const-string v1, "1"

invoke-virtual {v0, v1}, Landroid/view/View;->findViewWithTag(Ljava/lang/Object;)Landroid/view/View;

move-result-object v0

check-cast v0, Landroid/widget/TextView;

iput-object v0, p0, Lcom/mayor/codeSig/CodeSigWindow;->textView:Landroid/widget/TextView;

.line 35

invoke-virtual {p0}, Lcom/mayor/codeSig/CodeSigWindow;->getWindow()Landroid/view/Window;

move-result-object v0

invoke-virtual {v0}, Landroid/view/Window;->getDecorView()Landroid/view/View;

move-result-object v0

const-string v1, "2"

invoke-virtual {v0, v1}, Landroid/view/View;->findViewWithTag(Ljava/lang/Object;)Landroid/view/View;

move-result-object v0

check-cast v0, Landroid/widget/EditText;

iput-object v0, p0, Lcom/mayor/codeSig/CodeSigWindow;->editText:Landroid/widget/EditText;

.line 36

iget-object v0, p0, Lcom/mayor/codeSig/CodeSigWindow;->textView:Landroid/widget/TextView;

new-instance v1, Ljava/lang/StringBuilder;

const-string v2, "\u673a\u5668\u7801\uff1a"

invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V

invoke-virtual {p0}, Lcom/mayor/codeSig/CodeSigWindow;->GetStr()Ljava/lang/String;

move-result-object v2

invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v1

invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

.line 37

iget-object v0, p0, Lcom/mayor/codeSig/CodeSigWindow;->editText:Landroid/widget/EditText;

invoke-direct {p0}, Lcom/mayor/codeSig/CodeSigWindow;->read()Ljava/lang/String;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

.line 38

invoke-direct {p0}, Lcom/mayor/codeSig/CodeSigWindow;->read()Ljava/lang/String;

move-result-object v0

invoke-virtual {v0}, Ljava/lang/String;->length()I

move-result v0

if-lez v0, :cond_0

.line 40

invoke-virtual {p0}, Lcom/mayor/codeSig/CodeSigWindow;->showMain()V

.line 42

:cond_0

return-void

.end method

.method public showMain()V

.locals 2

.prologue

.line 44

new-instance v0, Landroid/content/Intent;

const-class v1, Lorg/imei/mtk65xx/Mtk65xx;

invoke-direct {v0, p0, v1}, Landroid/content/Intent;->(Landroid/content/Context;Ljava/lang/Class;)V

.line 45

.local v0, intent:Landroid/content/Intent;

invoke-virtual {p0, v0}, Lcom/mayor/codeSig/CodeSigWindow;->startActivity(Landroid/content/Intent;)V

.line 46

invoke-virtual {p0}, Lcom/mayor/codeSig/CodeSigWindow;->finish()V

.line 47

return-void

.end method

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/525871.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

python包含多个元组的元组_如何在python中将多个”列出的”元组连接成一个元组?...

在python中,关于这个问题的答案很少,如何将一个元组列表连接到一个列表中?,如何在python中合并两个元组?,如何在python中合并任意数量的元组?所有的答案都引用了元组列表,所以提供的…

centos6.5 mysql主从_CentosMysql主从备份

1、主库设置my.cnfserver_id 2 必须唯一binlog-do-db abo-assist 备份的数据库log-binmysql-bin 开启binlog创建同步账号并授权grant replication slave on *.* to replication% identified by 123456;2、从库server_id 10 必须唯一3、开启主从同步(从库上操作)mysql> st…

java socket ftp登录_基于java socket的简单FTP功能实现

实现FTP的一些功能,如上传文件,下载文件,显示目录,改变目录,退出等功能import java.io.BufferedInputStream;import java.io.BufferedOutputStream;import java.io.DataInputStream;import java.io.DataOutputStream;i…

java内嵌excel_如何在Excel中嵌入URL中的图像?

我试图从URL中提取图像并将其嵌入Excel中 .我的Excel表格很简单:它包含2列 .第1列具有图像URL . 在第2列中,我想嵌入图像 . 我使用以下代码 . 它在第一行工作得非常好,我在本地机器上保存了图像并给出了路径,但是当尝试直接从URL嵌…

java减治法深度优先查找_排序|减治法实现排序

总结一下排序嘿;)有插入排序和拓扑排序。1.插入排序/直接插入排序假设对较小的数组A[0...n-2]已经排好序了,然后把A[n-1]找到一个合适的位置插进去。一般来说是从右向左扫描这个有序的数组,直到遇到第一个小于A[n-1]的元素,然后把A[n-1]插在这…

linux服务器安装php7_CentOS 7 下 PHP 7.1.12 安装配置

Linux系统:CentOS 7记录在CentOS 7 下 PHP 7.1.12 安装配置的过程。先安装相关依赖包yum installpcre pcre-devel zlib zlib-devel openssl openssl-devel gd gd-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel e2fsprogs e2fsprogs-dev…

java试讲题目,常见的Java面试题汇总

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼二、关于集合1、Java中的集合及其继承关系关于集合的体系是每个人都应该烂熟于心的,尤其是对我们经常使用的List,Map的原理更该如此.2、poll()方法和remove()方法区别?poll() 和 remove() 都是从队列中取出一个元素&…

快钱接口php,快钱支付接口

1.下载快钱的demo代码和一个证书包,还有 人民币网关自助接入接口文档2.生成自己的证书2.0.安装 Win32OpenSSL_Light-0_9_8k.exe打开openssl.exe,2.1. 输入genrsa -out private-rsa.key 1024,按enter即可。2.2 输入req -new -x509 -key private-rsa.key…

php 二维数组排序函数,php自定义函数实现二维数组排序功能

本文实例讲述了php自定义函数实现二维数组排序功能。分享给大家供大家参考,具体如下:/**作用: 二维数组排序函数,支持多键名排序* 返回: 排序好的数组* 使用: array_msort(数组,需要排序的键名,排序方式);* 例子: array_msort($cflist,"chapter_ord…

其他机器无法访问php,PHP 局域网其他机器无法访问的问题

刚安装wamp以后本地访问localhost或者127.0.0.1可以访问,但是如果局域网内其他电脑访问则出现403错误。这大都是因为服务器配置不正确的原因,wamp安装后默认是禁止其他机器访问的。1,首先确定关闭了防火墙并且80端口没有被占用2,修…

php sql查询占位符,使用命名占位符时PHP / SQL插入错误

我有以下PHP PDO语句:$STH $this->_db->prepare("INSERT INTO UserDetails (FirstName, LastName,Address, City, County, PostCode, Phone, Mobile, Sex, DOB,FundraisingAim, WeeksAim, LengthsAim, HearAboutID,MotivationID, WelcomePackID, Contac…

linux+守护进程+php,【转载】Linux 守护进程的编程方法

【转载】Linux 守护进程的编程方法原文见:http://www.linuxdevelop.org/tingxx/show.php?tablec&id3Linux 守护进程的编程方法作者: 北京工业大学 小胡守护进程(Daemon)是运行在后台的一种特殊进程。它独立于控制终端并且周期性地执行某种任务或等待处理某些发…

翻手算法php,PHP各种常见经典算法总结【排序、查找、翻转等】

本文实例讲述了php各种常见经典算法。分享给大家供大家参考,具体如下:冒泡排序算法public function test() {$arr array(43, 54, 62, 21, 66, 32, 78, 36, 76, 39);var_dump($arr);echo ;$arr $this->bubblesort($arr);var_dump($arr);}public func…

php文件上传详解,PHP文件上传实例详解!!!

这篇文章主要介绍了PHP文件上传实例代码,需要的朋友可以参考下首先来看下上传部分的表单代码:文件: 这里有几个要注意的地方,首先看这句,这里我们采用POST方法,个别浏览器还支持PUT方法,当然这需…

php上传商品信息并显示,第37课 thinkphp5添加商品基本信息及通过前置钩子上传商品主图 模型事件(勾子函数)...

[TOC]手册地址:before_insert(新增之前的操作)要实现的功能上传原图片,在新增数据之前生成三张缩略图片,然后再插入数据添加商品基本信息及通过后置钩子上传商品主图思路控制器里调用模型的save()方法保存数据模型里的用前置勾子beforeInsert()保存之前把上传原图片先成三张缩略…

java下标越界的三种处理方式,数组下标越界,该怎么解决

数组下标越界package import_csv;import java.io.BufferedReader;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.IOException;import java.io.InputStreamReader;import java.io.UnsupportedEncodingException;import java.sql.Connect…

commvault备份mysql,备份MySQL数据库的4种方式

备份MySQL数据库的4种方式前言我们试着想一想, 在生产环境中什么最重要?如果我们服务器的硬件坏了可以维修或者换新, 软件问题可以修复或重新安装,但是如果数据没了呢?这可能是最恐怖的事情了吧, 我感觉在生产环境中应该没有什么比数据跟更为重要.那么我…

php $app-run(),Thinkphp 5.x 应用启动 App::run()

在上文加载完配置等一系列工作之后,进入App::run(),在run()方法中,首先通过自动加载机制拿到 Request 的一个实例接着 $config self::initCommon()初始化公共配置,先是 addNamespace 添加app当前所在的命名空间,然后 …

php react-native,React-Native+Mobx实现商城APP

这次给大家带来React-NativeMobx实现商城APP,React-NativeMobx实现商城APP的注意事项有哪些,下面就是实战案例,一起来看一下。最近一直在学习微信小程序,在学习过程中,看到了 wxapp-mall这个微信小程序的项目&#xff…

mysql 流程控制语句,mysql PL(procedure language)流程控制语句

在MySQL中,常见的过程式SQL语句可以用在存储体中。其中包括IF语句、CASE语句、LOOP语句、WHILE语句、ITERATE语句和LEAVE语句,它们可以进行流程控制。IF语句相当于Java中的if()...else if()...else...CASE语句相当于Java中的switch()...case A:...break;…