开发者

How can I make a variable that has the value of the text from a separate page?

How can I make a variable that has the value of the text from a separate page?

I have looked everywhere, but all it's giving me is how to get and post from page to page.

Example:

$var = (get txt from other page);

What my goal is, is to take the current u开发者_运维问答sers from a dat file, and separate them into an array.


file_get_contents('config.txt');


If you have a file with the data then you can use the php file operation functions ie.fopen,fclose to read the content of the file into a variable and then format it into an array. I hope this answer's your question. Because as your question states you don't need to pass information from web page to web page , but from a disk file to your web page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜