php如何php调用其他php文件 Desktop Entry 文件

window+Apache+Php环境配置方法 | 一聚教程网
window+Apache+Php环境配置方法
如果配置过忘了,呢么紧跟红字引导哦~
如果很讨厌配置环境这种工作的朋友,呵呵,搜"XAMPP"吧~安装包里应有尽有哦!
Ok,想知其然,并知其所以然,继续.
& & & &I. 下载Apache(msi版)
& & & & & & & &a. 网络域,服务器,管理员的设置,不确定就随意吧~记住哦(这些信息可以在httpd.conf里修改)
& & & & & & & &b. 安装,打开apache目录下的conf文件,找到httpd.cong,加入对PHP模块的支持
& & & & & & & & & & & &&O 在#LocalMoudle vhost_alias_moudle moudle/mod_vhost_alias.so的下面加代码
& & & & & & & & & & & & & & & & & & & &LoadMoudle php5_moudle X:/php/php5apache2_2.dll
& & & & & & & & & & & & & & & &效果:加载处理PHP的模块.
& & & & & & & & & & & &
& & & & & & & & & & & &&O 在AddType application/x-gzip .gz .tgz处加代码
& & & & & & & & & & & & & & & & & & & &AddType application/x-httpd-php .php
& & & & & & & & & & & & & & & & & & & &AddType application/x-httpd-source.php
& & & & & & & & & & & & & & & &效果:添加可识别PHP的MIME类型
& & & & & & & & & & & &
& & & & & & & & & & & &&O 在文件末尾添加以下代码
& & & & & & & & & & & & & & & & & & & &LoadFile X:phplibmcrypt.dll
& & & & & & & & & & & & & & & & & & & &LoadFile X:phplibmysql.dll
& & & & & & & & & & & & & & & &效果:支持libmcrypt和libmtsql
& & & & & & & & & & & &
& & & & & & & & & & & &&O 再在文件末尾添加以下代码
& & & & & & & & & & & & & & & &PHPIniDir "X:/php"
& & & & & & & & & & & &效果:设置php.ini的文件目录
& & & & & & & & & & & &
& & & & & & & & & & & &&O 注意: 只对于文件目录"" 和"/"的区分~
& & & & & & & & & & & & & & & &一般引号里面是 & /
& & & & & & & & & & & & & & & &引号外面是 &
& & & & & & & & & & & & & & & &
& & & & & & & & & & & &&O 另外还有一些说明在后面介绍
& & & & & & & & & & & &
& & & & & & & &
& & & &II. 下载PHP
& & & & & & & &a. php目录下的php.ini-xxxxxxxxx改为php.ini(后面再详细介绍一些设置)
& & & & & & & &b. 设置拓展文件目录
& & & & & & & & & & & &i. 找到extension_dir="./" --- 改为extension_dir="X:/php/ext"
& & & & & & & &c. 开启一些常用的拓展
& & & & & & & & & & & &Extension=php_gd2.dll
& & & & & & & & & & & & & & & &效果:支持GD绘图函数
& & & & & & & & & & & &Extension=php_mbstring.dll
& & & & & & & & & & & &Extension=php_mcrypt.dll
& & & & & & & & & & & &Extension=php_mysql.dll
& & & & & & & & & & & & & & & &效果:支持MySQL数据库
& & & & & & & & & & & &Extension=php_mysqli.dll
& & & & & & & &d. 添加环境变量
& & & & & & & & & & & &Path里添加"X:php"
& & & & & & & & & & & &
& & & &III. 运行PHP:
& & & & & & & &a. 启动Apache服务器吧~
& & & & & & & &b. 在apache的htdocs文件夹下建立phpinfo.php文件
& & & & & & & &c. 写如下代码 & : &
& & & & & & & &
& & & &IV. 注意事项:
& & & & & & & &a. Apache配置文件只在启动时调用,所以修改完一定要重启
& & & & & & & &b. Apache启动不了一般是因为配置文件有问题,常见的是有非法字符
& & & & & & & &c. Httpd.conf文件中没有指明可以支持.html时,就不要在html中嵌入php代码
& & & & & & & &d. 自己亲身体验!!8080端口不要被其他服务占用,否则默认生成不了服务器.
关于Apache的一些配置补充
& & & && 重要参数
& & & & & & & &a. ServerRoot "X:/apache" //软件安装位置
& & & & & & & &b. PidFile logs/httpd.pid & &//父进程的进程号文件位置
& & & & & & & &c. Listen:8080 & &//端口号
& & & & & & & &d. ServerName & &//主站名称
& & & & & & & &e. ServerAdmin & &//管理员邮件地址
& & & & & & & &f. DocumentRoot "/&/web/" & &//主站点的网页存储位置
& & & & & & & &g. DirectoryIndex & index.html & index.php & index.htm & &//主页文件设置
& & & && 几个指令
& & & & & & & &a. X:Apache2.2in> httpd &-k & install & -n & ApacheName
& & & & & & & & & & & &创建名字为的ApacheName服务
& & & & & & & &b. X:Apache2.2in> httpd &-k & uninstall & -n & ApacheName
& & & & & & & & & & & &删除名字为的ApacheName服务
& & & & & & & &c. X:Apache2.2in> httpd & -n & ApacheName & -t
& & & & & & & & & & & &检查配置文件正确性
& & & & & & & &d. X:Apache2.2in> httpd & -k & start/stop/shutdown/restart
& & & & & & & & & & & &基本操作
& & & & & & & &
& & & & & & & &
& & & & & & & & & & & &
& & & & & & & & & & & &
& & & & & & & &
关于PHP配置指令
& & & &1. Php.ini是php全局配置文件
& & & &控制的行为
& & & & & & & &语言选项 & & &&   安全模式 & && & & && 语法突出显示
& & & & & & & &杂项 & & & &&   & &资源限制 & & & && && 错误处理和日志
& & & & & & & &数据处理 & & && &&& 路径和目录 & & & &&& 文件上传
& & & & & & & &Fopen包装器 && & && 动态拓展& &&     模块设置
对于端口被占的情况
& & & &1. 启动的时候问题来了!Service State里面是空的!
& & & &2. 这说明服务里面没有apache这个服务
& & & &3. 据说emial不是admin,就不会有服务---不知道真的假的,反正端口被占用就有问题
& & & &4. 先取得最高权限吧~(控制面板-用户账户和家庭安全-系统和安全-操作中心-更改用户账户控制设置-改为"从不通知")
& & & &5. 重启
& & & &6. cmd输入:cd /d X:Apache2.2in转到指定目录
& & & &7. cmd执行:httpd.exe -k install -n apache2
& & & &8. okRecognized desktop entry keysRecognized desktop entry keys
Keys are either OPTIONAL or REQUIRED.
If a key is OPTIONAL it may or
may not be present in the file.
However, if it isn't, the
implementation of the standard should not blow up, it must provide
some sane defaults.
Some keys only make sense in the context when another particular key
is also present and set to a specific value. Those keys should not be
used if the particular key is not present or not set to the specific
value. For example, the Terminal key can only be used
when the value of the Type key is
Application.
If a REQUIRED key is only valid in the context of another key set to a
specific value, then it has to be present only if the other key is set to
the specific value. For example, the URL key has to be
present when and only when when the value of the Type
key is Link.
Some example keys: Name[C], Comment[it].
Table 2. Standard KeysKeyDescriptionValue TypeREQ?TypeType
This specification defines 3 types of desktop entries:
Application (type 1),
Link (type 2)
and Directory (type 3).
To allow the addition of new types in the future,
implementations should ignore desktop entries with an
unknown type.
stringYES Version
Version of the Desktop Entry Specification that the
desktop entry conforms with. Entries that confirm with this
version of the specification should use 1.0.
Note that the version field is not required to be present.
stringNO1-3Name
Specific name of the application, for example "Mozilla".
localestringYES1-3GenericName
Generic name of the application, for example "Web Browser".
localestringNO1-3NoDisplay
NoDisplay means "this application exists, but don't display it in the menus".
This can be useful to e.g. associate this application with MIME types, so that
it gets launched from a file manager (or other apps), without having a menu
entry for it (there are tons of good reasons for this, including e.g. the
netscape -remote, or kfmclient openURL kind of stuff).
booleanNO1-3Comment
Tooltip for the entry, for example "View sites on the
Internet". The value should not be redundant with the values of
Name and GenericName.
localestringNO1-3Icon
Icon to display in file manager, menus, etc.
name is an absolute path, the given file will be
used. If the name is not an absolute path, the algorithm described
will be used to locate the icon.
localestringNO1-3Hidden
Hidden should have been called Deleted.
It means the user deleted (at his level)
something that was present (at an upper level, e.g. in the system dirs). It's
strictly equivalent to the .desktop file not existing at all, as far as that user is
concerned. This can also be used to "uninstall" existing files (e.g. due to a renaming)
- by letting make install install a file with Hidden=true in it.
booleanNO1-3OnlyShowIn, NotShowIn
A list of strings identifying the desktop environments that
should display/not display a given desktop entry.
By default, a desktop file should be shown, unless an OnlyShowIn
key is present, in which case, the default is for the file not to
If $XDG_CURRENT_DESKTOP is set then it contains a
colon-separated list of strings.
In order, each string is
considered.
If a matching entry is found in
OnlyShowIn then the desktop file is shown.
If an entry is found in NotShowIn then the
desktop file is not shown.
If none of the strings match then
the default action is taken (as above).
The same desktop name may not appear in both
OnlyShowIn and NotShowIn of
string(s)NO1-3DBusActivatable
A boolean value specifying if D-Bus activation is supported for this application.
If this key is
missing, the default value is false.
If the value is true
then implementations should ignore the Exec key and send a D-Bus message to
launch the application.
for more information on
how this works.
Applications should still include Exec= lines in their desktop files for
compatibility with implementations that do not understand the DBusActivatable key.
booleanNO TryExec
Path to an executable file on disk used to determine if the program
is actually installed. If the path is not an absolute path, the file
is looked up in the $PATH environment variable. If the file is not
present or if it is not executable, the entry may be ignored (not be
used in menus, for example).
stringNO1Exec
Program to execute, possibly with arguments. See the
for details on how this key
The Exec key is required if DBusActivatable is not
set to true.
Even if DBusActivatable is
true, Exec should be specified for compatibility with
implementations that do not understand DBusActivatable.
stringNO1Path
If entry is of type Application, the working directory to run the program in.
stringNO1Terminal
Whether the program runs in a terminal window.
booleanNO1Actions
Identifiers for application actions. This can be used to tell the
application to make a specific action, different from the default
behavior. The
section describes how actions work.
string(s)NO1MimeType
The MIME type(s) supported by this application.
string(s)NO1Categories
Categories in which the entry should be shown in a menu (for
possible values see the ).
string(s)NO1Implements
A list of interfaces that this application implements.
By default, a desktop file implements no
interfaces.
for more information on how this
string(s)NO Keywords
A list of strings which may be used in addition to other
metadata to describe this entry. This can be useful e.g. to
facilitate searching through entries. The values are not meant
for display, and should not be redundant with the values of
Name or GenericName.
localestring(s)NO1StartupNotify
If true, it is KNOWN that the application will send a "remove"
message when started with the DESKTOP_STARTUP_ID environment variable set.
If false, it is KNOWN that the application does not work
with startup notification at all (does not shown any window, breaks
even when using StartupWMClass, etc.).
If absent, a reasonable handling is up to implementations (assuming false,
using StartupWMClass, etc.). (See the
for more details).
booleanNO1StartupWMClass
If specified, it is known that the application will map at least one
window with the given string as its WM class or WM name hint (see the
for more details).
stringNO1URL
If entry is Link type, the URL to access.
stringYES2

我要回帖

更多关于 php调用其他文件函数 的文章

 

随机推荐