小编Har*_*ard的帖子

密码输入字段在焦点/类型上从文本更改为密码?

我有一个注册表单,其中输入的标题位于文本框中,当您单击该框时,文本消失,但是在密码上我希望预览文本保留为"密码"而不是"•• ••••••".但是当用户点击文本框时应该清除文本,并且输入的文本应该是"•••••••".

这是按钮的代码:

<form method="post" action="register_process.php">
    <input type="text" class="button" value="USERNAME" onclick="this.value='';this.onclick='test';this.style.color='#000';" onfocus="if (this.value == 'USERNAME') {this.value = '';}" onblur="if (this.value == '') {this.value = 'USERNAME';}" name="username"  />
    <input type="text" class="button" value="EMAIL" onclick="this.value='';this.onclick='test';this.style.color='#000';" onfocus="if (this.value == 'EMAIL') {this.value = '';}" onblur="if (this.value == '') {this.value = 'EMAIL';}" name="email"  />
    <input type="text" class="button" value="PASSWORD" onclick="this.value='';this.onclick='test';this.style.color='#000';" onfocus="if (this.value == 'PASSWORD') {this.value = '';}" onblur="if (this.value == '') {this.value = 'PASSWORD';}" name="password"  />
    <input type="text" class="button" value="PASSWORD CONFIRM" onclick="this.value='';this.onclick='test';this.style.color='#000';" onfocus="if (this.value == 'PASSWORD CONFIRM') …
Run Code Online (Sandbox Code Playgroud)

html javascript css passwords

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

无法打开流权限被拒绝

我正在创建一个配置文件图像上传器,用户可以在其中选择一个文件并上传它,但我收到此错误:

Warning: move_uploaded_file(user_files/profile_img/c3487ff77d.jpg) [function.move-    uploaded-file]: failed to open stream: Permission denied in     /Applications/XAMPP/xamppfiles/htdocs/projects/lr/core/functions/users.php on line 4

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/Applications/XAMPP/xamppfiles/temp/phpi0WECJ' to 'user_files/profile_img/c3487ff77d.jpg' in /Applications/XAMPP/xamppfiles/htdocs/projects/lr/core/functions/users.php on line 4
Run Code Online (Sandbox Code Playgroud)

第二到第五行是:

function change_profile_image($user_id, $file_temp, $file_extn) {
$file_path = 'user_files/profile_img/' . substr(md5(time()), 0, 10) . '.' . $file_extn;
move_uploaded_file($file_temp, $file_path);
}
Run Code Online (Sandbox Code Playgroud)

在loggedin.php文件中的其余部分是:

if (isset($_FILES['profile_img']) === true) {
            if (empty($_FILES['profile_img']['name']) === true) {
                echo 'Please choose a file!';
            } else {
                $allowed = array('jpg', 'jpeg', 'png');

                $file_name = $_FILES['profile_img']['name'];
                $file_extn = strtolower(end(explode('.', …
Run Code Online (Sandbox Code Playgroud)

html php image

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

标签 统计

html ×2

css ×1

image ×1

javascript ×1

passwords ×1

php ×1