Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php7.x 代码已适配 可用 #12

Open
fhefh2015 opened this issue Nov 14, 2019 · 0 comments
Open

php7.x 代码已适配 可用 #12

fhefh2015 opened this issue Nov 14, 2019 · 0 comments

Comments

@fhefh2015
Copy link

data.php:

$conn=mysqli_connect("localhost","admin","xxxx"); //连接数据库地址、用户名、密码
mysqli_query($conn,"set names 'utf8'"); //数据库编码
mysqli_select_db($conn,"symhytwg_nows"); //数据库名称

index.php

//从这里开始 其他都不变 用下面的代码直接替换即可 记得导入数据
<?php
	$sql="select * from soul order by rand() limit 1";
	$rs=mysqli_query($conn,$sql);
?>		
<?php
	while($rows=mysqli_fetch_assoc($rs)){
?>		
    <span id="sentence" style="font-size: 2rem;"><?php echo $rows["title"]?></span>
<?php
    }
?>
@fhefh2015 fhefh2015 changed the title php7.x的代码 可用 php7.x 代码已适配 可用 Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant