国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home php教程 PHP開發(fā) Solution to invalid php session verification

Solution to invalid php session verification

Dec 24, 2016 am 09:35 AM

The example in this article describes the solution to invalid PHP session verification. Share it with everyone for your reference. The specific method is as follows:

1. Problem

I spent a long time configuring the apache+php environment today. Later, I succeeded, but I found that the verification code image could be generated. During the login verification, I found that the session was empty and had no value.

2. Solution

Environment: apache+php

The program code is as follows:

<input name="username" type="text" class="input" id="username">
<input name="password" type="password" class="input" id="password">
<input name="ver" type="text" class="input1" id="ver" size="5">
<img src="../inc/ver.php" onclick="this.src=&#39;../inc/ver.php&#39;;" />

Process the file after submission. This post.php file

if($_SESSION[&#39;ssioner&#39;]!=$ssever){
echo("<script>alert(&#39;驗(yàn)證碼必須由4位數(shù)字組成!&#39;);history.back();</script>");exit;  
}

It turns out that it keeps prompting that the verification code must consist of 4 digits, and then prints it out. session:

echo $_SESSION[&#39;ssioner&#39;];
exit;

has always been empty, so I thought of a session file directory configured in the php environment. Now we find the php.ini configuration file and find
upload_tmp_dir
and find that this directory is
upload_tmp_dir="D:www.php. cntp"
I checked my D drive and found that there was only the www.miracleart.cn file but no tp directory, so the problem was found. So I created a tp directory, restarted apache and found that there was the sess_i40gl0p4hfep5r69j67o1k26d01 file in the tp directory, so Logged in again and found success.


I hope this article will be helpful to everyone’s PHP programming design.

For more articles related to solutions to invalid PHP session verification, please pay attention to the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1488
72