Flash + Xml全英文网页 上传到Linux服务器,英文文字一部分不显示,动态按钮显示错位
我用Flash+Xml做的整站Flash网页,在本地测试可以正确显示,上传到Windows服务器上也可以正确显示,但是上传到Linux服务器却不能正确显示:动态按钮显示错...
我用Flash + Xml 做的整站Flash网页,在本地测试可以正确显示,上传到Windows服务器上也可以正确显示,但是上传到Linux服务器却不能正确显示:动态按钮显示错位,动态文本有的显示,有的不显示,请问是什么原因?
展开
2个回答
展开全部
/*****************************************
ls1.c
This is my own ls
By this program you can do :
ls
ls -a
ls -l
******************************************/
/********** Header Files ***************/
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <string.h>
/*** constant Define****/
#define true 1
#define false 0
/*static flag varible*/
int flag_l = 0,
flag_a = 0;
/******* Function Decleartion *********/
void do_ls ( char [] );
void print_name (char [], int);
void dostat (char *, char *);
void show_file_info( char *, char *, struct stat *);
void mode_to_letters( int , char [] );
char *uid_to_name( uid_t );
char *gid_to_name( gid_t );
void do_ls( char dirname[])
/*
List Files' Dirname;
*/
{
DIR *dir_ptr;
struct dirent *direntp;
/*This Can Explan a fullpath*/
char full_path[1024];
int total;
if ( ( dir_ptr = opendir (dirname) ) == NULL )
printf ( "myls : Cannot open \033[0;34m%s\033[0m\n", dirname );
else
{
printf ( "\033[0;34m%s \033[0m :\n", dirname );
total = 0;
while ((direntp = readdir( dir_ptr ) ) != NULL )/*get filename of dir*/
{
if ( !flag_a && direntp -> d_name[0] == '.') continue;
sprintf(full_path, "%s/%s", dirname, direntp -> d_name);/*full path=dirname + '/'+filename*/
dostat( full_path , direntp -> d_name);
++total;
}
printf("TOTAL : %d\n", total);
closedir ( dir_ptr );
}
}
void print_name (char filename[], int mode)
/* DIR can be printed in blue and others will be printed in green
*/
{
if ( S_ISDIR(mode) ) printf("\033[0;34m%s", filename); /* directory? */
else
printf("\033[0;32m%s", filename);
}
void dostat( char *full_path, char *filename )
{
struct stat info;
if ( stat(full_path, &info) == -1 ) /* cannot stat */
perror( full_path ); /* say why */
else /* else show info */
{
if(flag_l)
show_file_info( full_path, filename, &info );
else
{
print_name(filename, info.st_mode);
printf("\033[0m\n");
}
}
}
void show_file_info( char *full_path, char *filename, struct stat *info_p )
/*
* display the info about 'filename'. The info is stored in struct at *info_p
*/
{
char *uid_to_name(), *ctime(), *gid_to_name(), *filemode();
void mode_to_letters();
char modestr[11];
void mode_to_letters( info_p->st_mode, modestr );
printf( "%s" , modestr );
printf( "%4d " , (int) info_p->st_nlink);
printf( "%-8s " , uid_to_name(info_p->st_uid) );
printf( "%-8s " , gid_to_name(info_p->st_gid) );
printf( "%8ld " , (long)info_p->st_size);
printf( "%.12s ", 4+ctime(&info_p->st_mtime));
print_name(filename, info_p->st_mode );
printf("\033[0m\n");
}
/*
* utility functions
*/
void mode_to_letters( int mode, char str[] )
{
strcpy( str, "----------" ); /* default=no perms */
if ( S_ISDIR(mode) ) str[0] = 'd'; /* directory? */
if ( S_ISCHR(mode) ) str[0] = 'c'; /* char devices */
if ( S_ISBLK(mode) ) str[0] = 'b'; /* block device */
if ( mode & S_IRUSR ) str[1] = 'r'; /* 3 bits for user */
if ( mode & S_IWUSR ) str[2] = 'w';
if ( mode & S_IXUSR ) str[3] = 'x';
if ( mode & S_IRGRP ) str[4] = 'r'; /* 3 bits for group */
if ( mode & S_IWGRP ) str[5] = 'w';
if ( mode & S_IXGRP ) str[6] = 'x';
if ( mode & S_IROTH ) str[7] = 'r'; /* 3 bits for other */
if ( mode & S_IWOTH ) str[8] = 'w';
if ( mode & S_IXOTH ) str[9] = 'x';
}
#include <pwd.h>
char *uid_to_name( uid_t uid )
/*
* returns pointer to username associated with uid, uses getpw()
*/
{
struct passwd *getpwuid(), *pw_ptr;
static char numstr[10];
if ( ( pw_ptr = getpwuid( uid ) ) == NULL ){
sprintf(numstr,"%d", uid);
return numstr;
}
else
return pw_ptr->pw_name ;
}
#include <grp.h>
char *gid_to_name( gid_t gid )
/*
* returns pointer to group number gid. used getgrgid(3)
*/
{
struct group *getgrgid(), *grp_ptr;
static char numstr[10];
if ( ( grp_ptr = getgrgid(gid) ) == NULL ){
sprintf(numstr,"%d", gid);
return numstr;
}
else
return grp_ptr->gr_name;
}
/* main --->*/
main ( int ac, char *av[] )
{
int accnt;
if (ac==1) do_ls (".");
else
{
accnt = 1;
/*Get Param -l -a*/
while ( accnt < ac && (*(av+1) )[0] == '-')
{
++av;
++accnt;
switch ( (*av)[1] )
{
case 'l' : flag_l = true; break;
case 'a': flag_a = true; break;
default : break;
}
}
if (accnt == ac)
do_ls ( "." );
else
while (accnt < ac)
{
++accnt;
++av;
if ( strlen (*av) >= MAXPATHLEN )
{
printf("myls : %s is a so long name!\n", *av);
}
else
{
do_ls ( *av );
}
}
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询