小编saa*_*ulu的帖子

更改web root apache mac OS X.

我无法在apache中更改我的Web根目录,由于某种原因它指向/ Sites/folder1/folder2而不是指向/ Sites.我配置并更改了我的apache <Directory "/Users/saad/Sites">DocumentRoot /Users/saad/Sites 重新启动了我的apachectl但仍然没有.

apache macos

20
推荐指数
5
解决办法
8万
查看次数

使用LEFT JOIN和LIKE mysql

我在mysql查询中有问题.这是我的表格的样子:

mysql> select username, specialty from users;
+----------+------------------+
| username | specialty        |
+----------+------------------+
| JinkX    | php, html, mysql |
| test1    | html             |
+----------+------------------+


mysql> select name, tags from tasks;
+----------------+------+
| name           | tags |
+----------------+------+
| fix front page | html |
+----------------+------+
Run Code Online (Sandbox Code Playgroud)

当我尝试执行以下查询时,只有当专业完全等于标签时,它才有效.但我希望它能同时发挥作用

mysql> select tasks.name from users left join tasks on tasks.tags LIKE users.specialty where users.username = 'test1';
+----------------+
| name           |
+----------------+
| fix front page |
+----------------+

mysql> select tasks.name from …
Run Code Online (Sandbox Code Playgroud)

mysql

4
推荐指数
2
解决办法
1万
查看次数

如果在php中满足条件,则在fgets()之后删除行

我有一个非常大的文本文件,我使用fgets()逐行获取文件的内容.但如果满足某些条件,我需要从文件中删除一些文本.

例如:

hello world am string number 1 hello world am string number 2

hello world am string一个hello world am string B.

假设在字符串1中满足条件,那么我想删除字符串1和2,但不对字符串A和B执行任何操作

php

2
推荐指数
1
解决办法
2481
查看次数

标签 统计

apache ×1

macos ×1

mysql ×1

php ×1