Skip to content

Instantly share code, notes, and snippets.

@neltseng
Last active April 30, 2024 01:45
Show Gist options
  • Save neltseng/876bd30b6438f8fd02ac to your computer and use it in GitHub Desktop.
Save neltseng/876bd30b6438f8fd02ac to your computer and use it in GitHub Desktop.
檢測 PHP 執行使用者帳號工具 - cloudwp
<!DOCTYPE html>
<html lang="zh-TW" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#" itemscope="itemscope" itemtype="http://schema.org/Article">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">body,h1,h2,h3,h4,h5,h6,a{font-family:"Open Sans","PingFang TC","'Microsoft JhengHei","sans-serif";font-style:normal}body{margin:auto;background:rgb(233,239,243) none repeat scroll 0% 0%}h1{color:rgb(255,255,255);text-align:center;padding-bottom:3em;margin:auto;background:rgb(255,60,31) none repeat scroll 0% 0%;padding-top:1em}a{text-decoration:none;color:rgb(1,159,226)}span{color:rgb(251,45,45)}header{background:rgb(38,49,59) none repeat scroll 0% 0%;width:100%;padding-top:2em}.logo{margin-left:4%;padding-bottom:2em}.content{width:60%;margin:auto;padding:1em;line-height:1.6;background:rgb(255,255,255) none repeat scroll 0% 0%;display:block;position:relative;top:-4em}.php-user{text-align:center;font-size:1.25em}.ftp-login{max-width:100%;height:auto}footer{text-align:center;clear:both;font-size:14px;background:rgb(78,88,97) none repeat scroll 0% 0%;color:rgb(255,255,255);padding:1em;border-bottom:0.625em solid rgb(38,49,59)}</style>
<title>檢測 PHP 執行使用者帳號工具 - cloudwp</title>
</head>
<body>
<header>
<div>
<div class="logo">
<a href="https://cloudwp.pro/"><img src="https://lh5.googleusercontent.com/-L-apj3aylUE/Vg1vkLdab9I/AAAAAAAABbI/sinQxZhD-c0/w152-h34-no/logo.png" width="152" height="34" class="alignnone" / ></a>
</div>
<div>
<h1>檢測 PHP 執行帳號工具</h1>
</div>
</div>
</header>
<div class="content">
<div class="php-user">使用者帳號: <span><?php echo exec('whoami'); ?></span>
</div>
<h2>說明:</h2>
<ul>
<li>若檢測出的帳號名稱和您登入主機後台的帳號名稱不同時,就有可能造成無法上傳檔案的可能。
<li>
若非以您本人的帳號執行 PHP 時,也有可能會發生和下圖的情況一樣,在後台無法順利地直接安裝外掛。</li>
</ul>
<img class="aligncenter ftp-login" src="https://lh4.googleusercontent.com/-9_f53h2ZKzA/Vg1rToYux0I/AAAAAAAABa4/8mlM2ABfYUk/w740-h423-no/plugin%2Binstall.png" alt="" width="740" height="423"/>
<h2>解決方法:</h2>
<p>您可以向您的主機商反應,請他們將整個網站目錄的權限,變更為您登入主機後台的帳號名稱,這樣就能解決檔案權限的問題。</p>
</div>
<footer>Made by <a href="https://cloudwp.pro/">cloudwp</a> <?php echo date('Y');?><br>本工具允許散播及分享,但請務必保留所有原始碼。
</footer>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment