Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenchuanwen
my-yaf-project
Commits
6f599cbf
Commit
6f599cbf
authored
Sep 28, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc
parent
ad1f6598
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
2 deletions
+39
-2
a.php
a.php
+35
-1
MessageService.php
application/models/Business/Message/MessageService.php
+1
-1
index.php
public/index.php
+3
-0
No files found.
a.php
100755 → 100644
View file @
6f599cbf
<?php
<?php
echo
3333333
;
header
(
"Content-type: text/html; charset=utf-8"
);
//利用PHP目录和文件函数遍历用户给出目录的所有的文件和文件夹,修改文件名称
function
fRename
(
$dirname
)
{
if
(
!
is_dir
(
$dirname
))
{
echo
"
{
$dirname
}
不是一个有效的目录!"
;
exit
();
}
$handle
=
opendir
(
$dirname
);
$i
=
1
;
while
((
$fn
=
readdir
(
$handle
))
!==
false
)
{
if
(
$fn
!=
'.'
&&
$fn
!=
'..'
)
{
echo
"<br>将名为:"
.
$fn
.
"
\n\r
"
;
$curDir
=
$dirname
.
'/'
.
$fn
;
if
(
is_dir
(
$curDir
))
{
fRename
(
$curDir
);
}
else
{
$path
=
pathinfo
(
$curDir
);
if
(
empty
(
$path
[
'extension'
]))
{
//改成你自己想要的新名字
$newname
=
$path
[
'dirname'
]
.
'/'
.
$path
[
'basename'
]
.
'.jpg'
;
echo
"替换成:"
.
$i
.
'.'
.
$newname
.
"
\r\n
"
;
rename
(
$curDir
,
$newname
);
$i
++
;
}
}
}
}
}
//给出一个目录名称可以是相对路径,也可以是绝对路径
fRename
(
'/www/web/testadmin_shenbd_com/public_html/data/upload/mall/avatar_bak'
);
exit
();
application/models/Business/Message/MessageService.php
View file @
6f599cbf
...
@@ -247,10 +247,10 @@ class MessageServiceModel extends \Business\AbstractModel
...
@@ -247,10 +247,10 @@ class MessageServiceModel extends \Business\AbstractModel
{
{
$messageHistory
=
\DAO\MessageHistoryModel
::
getInstance
();
$messageHistory
=
\DAO\MessageHistoryModel
::
getInstance
();
$self
=
$this
->
getUserByMemberIdAndSelfType
(
$memberId
,
$selfType
);
$self
=
$this
->
getUserByMemberIdAndSelfType
(
$memberId
,
$selfType
);
$toMember
=
$this
->
getUserByMemberIdAndSelfType
(
$toId
,
$toType
);
if
(
empty
(
$toId
))
{
if
(
empty
(
$toId
))
{
$toId
=
$this
->
getMemberIdByOtherIdAndType
(
$otherId
,
$toType
);
$toId
=
$this
->
getMemberIdByOtherIdAndType
(
$otherId
,
$toType
);
}
}
$toMember
=
$this
->
getUserByMemberIdAndSelfType
(
$toId
,
$toType
);
$returnMemeber
[
'toId'
]
=
(
int
)
$toId
;
$returnMemeber
[
'toId'
]
=
(
int
)
$toId
;
$returnMemeber
[
'toUserId'
]
=
(
int
)
$toMember
[
'uid'
];
$returnMemeber
[
'toUserId'
]
=
(
int
)
$toMember
[
'uid'
];
$returnMemeber
[
'toUserName'
]
=
$toMember
[
'name'
];
$returnMemeber
[
'toUserName'
]
=
$toMember
[
'name'
];
...
...
public/index.php
View file @
6f599cbf
...
@@ -17,3 +17,6 @@ if(APP_ENV=='test' || APP_ENV=='pre' ||APP_ENV=='ccwdevelop' || APP_ENV=='produc
...
@@ -17,3 +17,6 @@ if(APP_ENV=='test' || APP_ENV=='pre' ||APP_ENV=='ccwdevelop' || APP_ENV=='produc
}
}
$app
=
new
\Yaf\Application
(
APPLICATION_PATH
.
"/conf/application.ini"
,
APP_ENV
);
$app
=
new
\Yaf\Application
(
APPLICATION_PATH
.
"/conf/application.ini"
,
APP_ENV
);
$app
->
bootstrap
()
->
run
();
$app
->
bootstrap
()
->
run
();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment