English 中文(简体)
PHP 类别和方法
原标题:PHP class and method
  • 时间:2010-01-03 11:28:37
  •  标签:
  • php

Im using category.twitter.php (http://emmense.com/php-twitter/documentation/v11-methods- available/)

采用该守则:

$summize = new summize;
$search = $summize->search( #test );

echo "<pre>";
print_r($search);
echo "</pre>";

产出是:

stdClass Object
(
    [results] => Array
        (
            [0] => stdClass Object
                (
                    [profile_image_url] => http://a1.twimg.com/profile_images/327884498/Tobias_Zielke_ums_logo_normal.jpg
                    [created_at] => Sun, 03 Jan 2010 10:47:14 +0000
                    [from_user] => tobiaszielke
                    [to_user_id] => 
                    [text] => Ich hoffe unser See ist nicht zugefroren #Trocki #Waterproof #Test
                    [id] => 7329402210
                    [from_user_id] => 27862585
                    [geo] => 
                    [iso_language_code] => de
                    [source] => <a href="http://ubertwitter.com" rel="nofollow">UberTwitter</a>
                )

....

我怎么能把[来自用户]、[文本]并写到档案中?

最佳回答
$text = $search[ results ][0][ from_user ] .  :   . $search[ results ][0][ text ];
file_put_contents( file.txt , $text);
问题回答

http://www.ohchr.org。

书面材料请查阅file_put_contents(





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签