分页: 23/29 第一页 上页 18 19 20 21 22 23 24 25 26 27 下页 最后页 [ 显示模式: 摘要 | 列表 ]
Jan 22

<?php

// created by joe lumbroso
// see some other good php3 scripts
// goto http://www.dtheatre.com/scripts

echo "<font color=\"red\"><blink><b>Pinging</b></blink></font><br>";
$to_ping = "dtheatre.com";
$count = 3;
$psize = 65;
echo " Please be patient, this can take a few moments...\n<br><br>";
flush();

while (1) {
?>
<pre>
<?
exec("ping -c $count -s $psize $to_ping", $list);
for ($i=0;$i < count($list);$i++) {
print $list[$i]."\n";
}
?>
</pre>
<?
flush();
sleep(3);
}
?>
Jan 18
没什么只是手册
up/1137585149.chm
Dec 27
Dec 27

It is very easy to use FCKeditor in your PHP web pages. All the integration files are available in the official distributed package. A simple include command to the fckeditor.php file will integrate FCKeditor to your PHP pages.

Step 1

Suppose that the editor is installed in the /FCKeditor/ path of your web site. The first thing to do is to include the "PHP Integration Module" file in the top of your page, just like this:

<?php
include("FCKeditor/fckeditor.php") ;
?>

Step 2

Now the FCKeditor is available and ready to use. So, just insert the following code in your page to create an instance of the editor (usually inside a <FORM>):

<?php
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '/FCKeditor/';
$oFCKeditor->Value = 'Default text in editor';
$oFCKeditor->Create() ;
?>

"FCKeditor1" is the name used to post the editor data on forms.

Step 3

The editor is now ready to be used. Just open the page in your browser to see it at work.

The complete sample

<?php
include("FCKeditor/fckeditor.php") ;
?>
<html>
 <head>
   <title>FCKeditor - Sample</title>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 </head>
 <body>
   <form action="savedata.php" method="post">
<?php
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '/FCKeditor/';
$oFCKeditor->Value = 'Default text in editor';
$oFCKeditor->Create() ;
?>
     <br>
     <input type="submit" value="Submit">
   </form>
 </body>
</html>

Handling the posted data

The editor instance just created will behave like a normal <INPUT> field in a form. It will use the name you've used when creating it (in the above sample, "FCKeditor1").

So, to retrieve its value you can do something like this:

$sValue = stripslashes( $_POST['FCKeditor1'] ) ;

Samples

You can find some samples on how to use the editor in the "_samples/php" directory of the distributed package.

Other info

If you want to retrieve the resulting HTML instead of outputting it directly to the browser (for example if you're using it in a template engine such as Smarty), you can call the CreateHtml() method instead:

$output = $oFCKeditor->CreateHtml() ;

  • To change the size of the editor in the page, insert the following code before calling the Create() or CreateHtml() methods:

$oFCKeditor->Width  = '100%' ;
$oFCKeditor->Height = '200' ;

and just change the values to your needs.


  • To modify configuration settings in a separate file outside the editor's directory, add them to the Config property of the editor object:

$oFCKeditor->Config['CustomConfigurationsPath'] = '/myconfig.js' ;

  • To set the path for saving uploaded files uncomment the following line in /FCKeditor/editor/filemanager/browser/default/connectors/php/config.php.

// $Config['UserFilesPath'] = '/UserFiles/' ;

Note: Set the permission of the upload directory properly. You should also uncomment the settings of LinkBrowserURL and the ImageBrowserURL in the /FCKeditor_2.0fc/fckconfig.js file for the browsing and uploading function to work properly. See Built-in File Browser for more information.

Important Note for PHP with Safe Mode activated : You'll have to create /UserFiles/File, /UserFiles/Flash, /UserFiles/Image and /UserFiles/Media in order for the filebrowser to work. Of course, you'll also have to set the correct permissions for these directories. Furthermore, don't use the "Create new folder" button. The folder would be created but couldn't be used (Safe Mode restriction).

2005-12-26 18:05:07由ppp-slp-b编辑

Dec 21

在phpMyAdmin2.6以上版本因为支持多语言集,弄得我们使用phpMyAdmin管理数据库的时候,查询出来的中文都是乱码,但是在我们的PHP程序调用时却没有这些问题。
看来是phpMyAdmin2.6的配置有问题了,为了解决这个问题,我上google上搜索了相关资料,这类的问题很多,但没一个可以解决的,真是没办法,看来只有自己动手解决了。

。。。由于查找源代码过程非常烦琐,略

最终花了半天的时间,总算找到了一个比较折衷的方法来解决。

去phpMyAdmin2.6的根目录下,打开以下这个文件:
libraries/select_lang.lib.php
1、找到有"zh-gb2312"的那一行,把'zh-gb2312' 改成 'zh-gb2312-utf-8'
   为什么这样加?那是因为服务器会把没有"-utf-8"的语言过滤掉,在libraries/database_interface.lib.php 第168行,根据英文说:“为了防止混淆”,:<

或者如果不把'zh-gb2312' 改成 'zh-gb2312-utf-8',可以去掉过滤吧。把那个if去掉就OK了。

2、找到"$mysql_charset_map = array("那一行
把'gb2312'       => 'gb2312',
改成 'gb2312'       => 'latin1',

保存,OK,在进入phpMyAdmin管理,选择语言chinese simplified(zh-gb2312-utf-8)
再看看你的那些中文数据。

所以说,我的这个解决办法就只是修改libraries/select_lang.lib.php这一个文件里的两个字就行,比较方便快捷,哈哈。

--------------------------------------------------------------------------

以上是原作者的内容

我反查了

select_lang.lib.php

if (!isset($cfg['AllowAnywhereRecoding']) &line;&line; !$cfg['AllowAnywhereRecoding']) {
    $available_language_files               = $available_languages;
    $available_languages                    = array();
    foreach ($available_language_files AS $tmp_lang => $tmp_lang_data) {
        if (substr($tmp_lang, -5) != 'utf-8') {
            $available_languages[$tmp_lang] = $tmp_lang_data;
        }
    } // end while
    unset($tmp_lang, $tmp_lang_data, $available_language_files);
} // end if

phpmyadmin把没有utf-8的所有编辑都过滤了

分页: 23/29 第一页 上页 18 19 20 21 22 23 24 25 26 27 下页 最后页 [ 显示模式: 摘要 | 列表 ]