data between two php files
I have this php script:
<?php
include("simple_html_dom.php");
$url = "http://en.wikipedia.org/wiki/Thailand";
echo file_get_html($url);
?>
How can I send the $url variable to my tosql.php script ?
I apologize for not including more about what Im doing. Im actually sending this url to a jquery script which sends this to a php script titled tosql.php (which stores the processed data into mysq开发者_如何学JAVAl from the jquery script)
This should do what you want.
<?php
$url = "http://en.wikipedia.org/wiki/Thailand";
include("simple_html_dom.php");
echo file_get_html($url);
?>
By declaring $url
before your include, it's basically the same as declaring $url
at the very top of simple_html_dom.php
.
精彩评论