save

Where to Save Files PHP In Xampp

welcome back everybody so in this class

one is going to teach you where to save

the PHP files actually we can save the

HTML files anywhere but there is a

problem to save the PHP files so this is

a folder named the disk of the specie

and actually this is my computer or in

any way we just have to go to the C

Drive okay

the go inside the C Drive and here

inside this M folder we must have to go

inside the temp folder okay then inside

the same folder well if you just

remember that we just installed the samp

in previous class so this is the folder

named htdocs let us go inside the htdocs

and here actually we have to create

every project inside this folder okay

these are all the back folders actually

different projects or ezt so here if you

just want to create a new file or a new

actually project then let us create a

new folder here and the name of the

folder I'm just thinking to create PHP

okay so now inside the PHP we can create

all the things in all the files and

actually we can get the file on the

server so now let's just create the file

here inside the example inside the C

Drive in the sample in the PhD Docs and

in D and actually htdocs has projects

and this is a PHP folder okay this is

really important to do that by the way

I'm just saving this file and I'm just

going to the same place because just

mentioned to you the C Drive and so

inside the C Drive there is this amp

folder okay inside the same folder there

is the htdocs folder and here it is the

PHP folder okay I'm just saving the file

in the index name now we have to add the

dot PHP extension because I just want to

create the file in PHP so definitely so

by the way we just know all the basics

of all about HTML then you know that we

don't need to select the save as type by

the way we can choose the well we can

select weekends we have to choose the

PHP hypertext

it means the PHP or if it you could just

just simply type dot PHP then you

actually not necessary to select the

save

file for now just click on Save button

ok so right now I'm just creating a

simple PHP PHP file and then I'll just

guide you what it's doing here I'm just

creating a simple HTML file okay dollar

one actually this is the variable I'll

guide you how to work with them but I

just want to show you why actually we

have you must have to save the file

inside the SD docs folder so now the Val

to you is equals to 2 or it is 4 and it

is 3 okay so now echo and I'm just

typing over here I'm just typing well 3

equal to you were 1 plus were oh not in

this way dollar var two if you just know

about JavaScript and this thing is

really easy for you or any of the

programming language because PHP is

actually really simple and really

matching with Java scripts all of its

function and all of its features by the

way and with some few programming

languages so here I'm just echoing dl3

I'll give you what is this script but

but the basic logic is this is the

variable and this variable has the value

of 3 I just put at the tree okay this is

another variable which has the value 4

and these variable are created by me

okay by myself and then this is 1 3

which has the value which which has no

value actually the calculation of var1

and where to mean plus world 1 plus 2 R

2 so plus that means 3 plus 4 so here

this is echo val 3 so now if I just go

there to the folder there is the folder

here with the phone and I just picked

this folder and drop this to the date of

to the Google Chrome and I'm just

pasting this here as the address and now

it is opening now it is the perfect

thing actually instead of copying or

actually instead of subtracting or

adding it just gives us the simple

result actually just rendered the result

but we can create this file anywhere and

we can get this

for example if I just save this file and

is copying this file and pasting it on

the desktop and it's picking this again

and just go to the Chrome or any other

browser and just pasting this now I'm

getting the same result okay but if I

just save any file inside the HP ducts

so this is the thing which I just want

to tell you if I just save any file

inside the htdocs so what I have to do I

just have to type localhost / and PHP

and then this is a folder name okay then

just press Enter

we don't need to mention that varies on

file for example the file is in C the

file in exam and the file is in the

sample has the folder of extra Doc's and

htdocs' head of a folder just type

localhost and add a slash and then just

type a folder name direct to your

project folder name press ENTER and now

it is processing oh it is not processing

and just why because we have to run up

this amp server

I just didn't run the top so this is

really important this is our server I'm

just clicking on Apache and the my SQL

so definitely I just run both of them

but at this time this my SQL is not

really important this will be important

when we just work on the my SQL but the

Apache is really important okay now

let's just refresh this again and I'm

getting seven what the me no seven

actually three plus four is equal to

seven and by using echo we can echo or

actually print any command on the

browser so definitely you understood

that how it works

if you save our file inside the htdocs

folder inside this folder then we don't

need to mention anything the complete

directory just directly mentioned the

project name and as he knew that the

index P index folder or our index page

can directly be loaded but if we can tie

the index dot PHP as well and in this

way I'm getting the result so I hope you

enjoyed stewed and I I just need to

delete this file because this is not

workable this is on desktop goodbye and

stay tuned