我无法在apache中更改我的Web根目录,由于某种原因它指向/ Sites/folder1/folder2而不是指向/ Sites.我配置并更改了我的apache
<Directory "/Users/saad/Sites">并
DocumentRoot /Users/saad/Sites
重新启动了我的apachectl但仍然没有.
我在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) 我有一个非常大的文本文件,我使用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执行任何操作