Jump to content

[SOLVED] quick question :d


adv

Recommended Posts

hello i`ve played a little in php and there`s a thing that i don`t understand.

I have a file :  test.txt , inside of it i have

&test=testing&value=cool&blabla=ok

 

and in php

$h=file_get_contents('test.txt');
parse_str($h);

i know that parse_str()  makes strings into variables

and  u can acces $test as a variable

but the thing is i dont understand how it keeps it .. where it keeps the strings made into variables

how does it know..

kinda weird question :| sorry if  i didnt make myself clear ... my english is buggy :(

Link to comment
Share on other sites

ken i knew all that

i`ve used file_get_contents intentionally

i just wanted to know how php memorize it all

 

but the thing is i dont understand how it keeps it .. where it keeps the strings made into variables
how does it know.. 

 

not to show me i can echo it :|

Link to comment
Share on other sites

thanks :D

i have another question and i dont think is needed to open a new thread :D

my question is this

 

i have email.php

 

 
<?php
if(isset($_GET['sendEmail'])){
$sendEmail=1;
$value1=$_GET['value1'];
$value2=$_GET['value2'];
$value3=$_GET['value3'];
}
if($senEmail==1){
mail('email.com','subject','testing');
}
?>

 

and in another file i have this

<?php
$remote_send='http://site.com/email.php?';
$send_mail=1;
$value1='firstvalue';  $value2='secondvalue'; $value3='thirdvalue';
if($send_mail==1){
$remote_send.='sendEmail=&value1='.urlencode($value1).'&value2='.urlencode($value2).'&value3='.urlencode($value3);
}
?>

 

but it doesnt send , i dont understand why

if i do this :

http://site.com/email.php?sendEmail=&value1=firstvalue&value2=secondvalue&value3=thirdvalue

if sends the email

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.