code設置php可執行文件,php編譯成可執行文件

本文目錄一覽:

xp操作系統下怎麼樣配置php運行環境

EditPlus的一些設置(下載,STX,ACP,調試).

用過N個PHP編輯器以後,最後還是覺得EditPlus才是最棒的!

1.下載EditPlus V2.21 Build 381 漢化版

下載地址:

2.下載語法文件和自動完成文件,它們分別以STX和AXP後綴結尾。下載我出的這個版本後沒有php.acp文件,也不知道

php.stx文件是不是最新的,所以我就到官方網站上下載了php.acp文件和一個最新的php.stx文件。

stx文件:

描述:php503.zip (2005-01-08)

PHP 5.0.3 stx – Seung Hwan Kang

acp文件:

描述:php12.zip (2002-05-09)

PHP acp – Rasel Khan ,老了些,但我只能找到這個了!

3.安裝上php.stx和php.acp文件。

我的EditPlus安裝在C:\Program Files\EditPlus 2里,那麼我就把下載下來的php.stx和php.acp文件複製到C:\Program Files\EditPlus 2

中來,其中php.stx會提示是否覆蓋,點是就行了!這時候,php.stx文件就安裝完成了,現在來載入php.acp文件,打開

EditPlus點,工具-參數選擇-在左邊點「語法」,右邊選擇「PHP」,右下的「語法設置」中,可以找到「自動完成」

的路徑框,填上「C:\Program Files\EditPlus 2\php.acp」就好了!

4.用EditPlus調試PHP文件。

以我的機器為例,我裝的是WindowsXP + PHP4(D:/Web/PHP) + Apache2.0(D:/Web/Apache) + MySQL(D:/Web/MySQL)

打開EditPlus點,工具-參數選擇-在左邊點「工具」,右邊有個「Web伺服器根目錄」,點「添加」,出現「初始化

Web 伺服器」,在「網路伺服器IP或主機名」中填上localhost,因為我是在本機上調試且用的是默認的主機名,所以

用localhost,下面的「網路伺服器根目錄」中填上D:/PHP,本來Apache默認的網路伺服器根目錄(你放PHP文件的目錄)

應該在D:\Web\Apache\htdocs的,但我為了方便改成了D:/PHP,這個設置可以在php.ini文件中改!

先準備好以下幾個軟體,在自己的官方網站可以下載,我採用的不是最新版本!

下面提供的安裝方法其它版本並不一定適用.

apache_2.0.58-win32-x86-no_ssl.msi

下載:

php-4.4.2-Win32.zip

下載:

mysql-4.1.20-win32.zip

下載: /* 需要填寫一些基本註冊信息,不想填的話可以去華軍或是天空去下載 */

一, 安裝PHP,配置php.ini

1, 將下載的php-4.4.2-Win32.zip解壓到D:\PHP\ 這個目錄; /* 你也可以解壓到其它目錄,但是在下面的路徑中也要做相應的修改 */

2, 再將D:\PHP\ 目錄下的 php4ts.dll 和 \dlls 目錄下的所有文件文件複製粘貼到 C:\Windows\system32\ 下; /* Windows 2000 下為 C:\Winnt\system32 */

3, 將D:\PHP\ 目錄下的php.ini-dist文件拷到C:\Windows\ 下,改名為 php.ini ; /* Windows 2000 下為 C:\Winnt */

使用文本編輯器打開php.ini文件,搜索 extension_dir = “./”,並將其路徑指到你的 PHP 目錄下的 extensions 目錄,比如:extension_dir = “D:\PHP\extensions”; // extension_dir是PHP插件的擴展目錄 */

再搜索 register_globals = Off,將 Off 改成 On; /* register_globals的意思就是註冊為全局變數,所以當On的時候,傳遞過來的值會被直接的註冊為全局變數直接使用,而Off的時候,我們需要到特定的數組裡去得到它 */

查找;Windows Extensions項,它下面所列的就是 PHP 預支持的擴展模塊,默認情況下都用分號在前面注釋掉了,如果你想 PHP 支持某個模塊,請將前面的”;”去掉即可;

;Windows Extensions

;Note that MySQL and ODBC support is now built in, so no dll is needed for it.

;

;extension=php_mbstring.dll

;extension=php_bz2.dll

;extension=php_cpdf.dll

;…

;….

;extension=php_xslt.dll

;extension=php_yaz.dll

;extension=php_zip.dll

PHP.INI其他設置:

asp_tags = On ; /* On允許使用ASP風格的標記,Off禁止使用ASP風格標記 */

upload_max_filesize = 2097152; /* 上傳文件的最大位元組 */

二, 安裝Apache,配置 httpd.conf 使之支持PHP

1, 安裝 apache_2.0.58-win32-x86-no_ssl.msi,以默認安裝就可以一路 Next,我安裝完成在瀏覽器里輸入地址 ,測試一下是否成功; /* 如果安裝了IIS請關閉,或者請改變安裝埠,不然無法啟動Apache服務 */

2, 我這裡Apache安裝在D:\Apache2\,打開D:\Apache2\conf\httpd.conf,在最後一行添加如下代碼:

LoadModule php4_module “D:/php/sapi/php4apache2.dll”

AddType application/x-httpd-php .php

3, 查找 DirectoryIndex index.html index.html.var 在後面加入 index.htm index.php; /* 這裡是自定義默認首頁 */

查找 Documentroot “d:/apache2/htdocs” 將其改為你的WEB路徑; /* 這裡是WEB主目錄,可以不修改 */

4, 重啟apache.

5 ,在web根目錄 D:\Apache2\htdocs\ 下新建一個 phpinfo.php,內容如下:

?php

phpinfo();

?

6, 打開瀏覽器,輸入:,如果安裝成功,將顯示當前伺服器所支持 PHP 的全部信息.

三, 安裝MySQL

1, 解壓mysql-4.1.20-win32.zip雙擊執行Setup.exe將MySQL安裝到指定目錄,吟清安裝的是D:\MySQL\,安裝有一點註冊信息要填寫,也可以略過;

2, MySQL安裝完成之後就是配置嚮導,Next 選擇Standard Configuration Next 勾選Install As Windows Service,默認Service Name:MySQL,勾選Launch the MySQL Server Automaically 勾選Modify Security Settings,New root password:123,Confirm:123 Execute Prepare configuration,Write configuration file (D:\MySQL\my.ini),Start service,Apply security settings Finish.安裝完成.

3, 運行 MySQL Command Line Client

Enter password: *** /* 在這裡輸入密碼,吟清設置的密碼是123 */

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 3 to server version: 4.1.20-community-nt

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql show databases;

+———-+

| Database |

+———-+

| mysql |

| test |

+———-+

2 rows in set (0.00 sec)

mysql _

如果出現以上畫面,表明MySQL已經安裝成功.

4, 這個版本MySQL的加密演算法變了,鏈接資料庫明明輸入了正確的密碼還是出現 MySQL #1251 Error 錯誤:

Client does not support authentication protocol requested by server. Consider upgrading MySQL client

比如這段程序,可以用來檢測資料庫是否連接成功,運行會出現錯誤!

?php

$link=mysql_connect(‘localhost’,’root’,’123′);

if(!$link) echo “MySQL 資料庫連接失敗”;

else echo “MySQL 資料庫連接成功!”;

mysql_close();

?

吟清在Google找到解決方法:

mysql SET PASSWORD FOR

– ‘ some_user ‘@’ some_host ‘ = OLD_PASSWORD(‘ newpwd ‘);

結合我們的實際情況,在 MySQL Command Line Client 下運行:

set password for root@localhost = old_password(‘123’);

所謂工欲善其事,工欲善其事,必先利其器,手中有了利器才能讓我們的PHP之路更加便捷,下面介紹幾款常用的PHP編輯器!

Zend Studio

開發商:

目前公認的最強大的PHP開發工具,這種集成軟體包包括了用於編輯,調試,配置PHP程序所需要的客戶及伺服器組件,軟體包具有工業標準的PHP開發環境,代碼完成引擎,功能齊全的調試器等

註冊Name: ttdown.com

註冊S/N: 9E023F9D000060000069696969

UltraEdit32

UltraEdit32頂頂大名的編輯器,加上一個 for php 的 wordfile非常好用,wordfile其實是一個文本文件,其中設定了關鍵字、變數…的顏色,這樣,php文件看起來很舒服。

EditPlus

跟UltraEdit32一樣頂頂大名的編輯器,可以顏色標記HTML Tag (同時支持 C/C++、Perl、Java) 外,還內置完整的HTML和 CSS1 指令狀態,支持 HTML, CSS, PHP, ASP, Perl, C/C++, Java, JavaScript and VBScript;通過一些配置可以讓Editplus成為強大的PHP編輯器,配置Editplus:,吟清用得就是它,推薦使用!

Name:

Code: 9C6E3-4E628-AEZ9E-FCWB2-A7T87

NuSphere PHPEd

PhpED 通過無與倫比的PHP調試和壓縮能力,以及一個新的NuSOAP web服務嚮導成為了PHP領域的領軍產品。更加強大的Project Manager使得發布站點和應用程序比以前更加容易。現在可以在線程級別對正在運行或者開發中的程序進行測試和調校。支持 CVS 版本控制,而且,對PostgreSQL和MySQL資料庫的本地支持為PHP使用開源資料庫提供了一個廣泛的環境。但對中文支持不太好,漢字都當作單位元組處理了。PHPED還有Linux版本。

PHP Coder

PHPCoder用於快速開發和調試PHP應用程序,它很容易擴展和定製,完全能夠符合開發者的個性要求.1:結合了PHP編譯器和參考文檔,可以對編輯中的PHP腳本進行即時預覽2:支持高亮顯示HTML和PHP代碼;3:自動完成功能,可以自動完成用戶自定義代碼片斷;4:標準函數提示;5:有專門的工程項目管理器;6:對象瀏覽器搜尋編輯中文件的包含信息,自定義函數,並以樹形顯示.7:支持查找對稱的語句標記符;8:支持高級搜索和替換;9:自帶FTP功能;10:支持運行和斷點調試11:……總之,PHPCoder是一個非常實用的,功能強大的編程環境,而且它是免費的!

Ankord PHP Expert Editor

PHP Expert Editor是一個容易使用的 PHP 開發工具,它的功能照顧到初級者及專業開發人員。 PHP Expert Editor 內建 http server 用作測試及除錯(你也可以使用其他 http server), PHP 語法檢查, FTP 功能,程式碼樣板等功能。

DzSoft PHP Editor

專為 PHP 所設計的網頁程序編輯軟體 – DzSoft PHP Editor,具有 PHP 編輯、偵錯、瀏覽、原始碼檢視、檔案瀏覽、可自訂的原始碼樣本..等功能,無須架設網站主機就可以測試 PHP 指令碼,是一套功能強大的 PHP 編程軟體。

DzSoft PHP Editor和Ankord PHP Expert Editor非常相識,幾乎找不到他們的主要區別,關於這兩個軟體之間的具體內幕我也不太清楚!

Dev-PHP IDE

非常好用的php編輯器,支持php-gtk,內建許多快速html表單,非常的好用,本身含繁體語言包

Master PHP

一款支持PHP, PHP3, PHTML, CSS, JS, HTML, HTM and SQL的編輯器,它允許用戶編輯多種一次編輯多種文件,允許插入,運行和最優化程序的腳本,用戶可以通過工具欄定製按鈕和窗體,可以導出html和rtf格式,支持18種語言

Komodo

Komodo支持在Windows與Linux上,Perl、Python及JavaScript等的程序語言開發,以及多種程序語言語法不同顏色標註。這款功能強大的IDE竟然不支持中文,連中文文件名的文件都打不開!

Maguma Studio

Maguma Studio包含了編輯和調試 PHP 程序所有必須的工具。無論您是經驗豐富的開發者、或是初學者它都適合您。帶有十分完整的斷點、分步等調試功能。支持以樹形方式顯示文件中的函數和類成員。

PhpLens

PhpLens是一款專為PHP開發人員準備的快速資料庫開發程序。通過使用PhpLens,可以快速的設計、發布和維護資料庫驅動的網路產品。它允許你以HTML表格的形式對資料庫進行瀏覽、編輯、創建、刪除和查找。不用寫任何代碼,它就允許你完成上述操作。

PHP Designer

特點:支持 PHP, HTML, XHTML, CSS, Java ,Perl, JavaScript, VB, C# SQL的代碼加亮功能;支持Template;內置PHP調試功能;項目管理功能;PHP函數提示功能;支持類瀏覽;內置了PHP函數搜索功能;支持擴展工具;支持FTP;兼容Windows/Dos, Unix, Mac各種文件格式;代碼庫功能;(內置了很多界面主題,很貼心的功能~)支持主題;假以時日,這個編輯器一定會成為你PHP編程的利器~

PSPad editor

免費的編輯器,集各種編輯器的優點於一身,同時編輯多個文件,可以使用project;內置HEX編輯器;內置HEX編輯器;支持宏的錄製和使用;支持語法高亮和彩色顯示,HTML,PHP,Pascal,JScript,VBScript,SQL,Perl,JAVA…;內置文件比較工具;支持宏的錄製和使用;內置FTP工具;可以針對不同的文件類型設置對應的外部工具;支持外部編譯器。

好!經過前面的三步學習,我們已經配置好 PHP 的運行環境,現在才真正開始漫長的 PHP 之路.

這一節內容我們主要講 PHP 的基本語法標記,分隔符和注釋方法.

我們使用Editplus建立第一個 PHP 頁面 first.php.

html

head

titleMy First PHP Page/title

/head

body

?php

echo “h1這是我第一個使用PHP輸出的頁面/h1”; // 吟清PHP學習之路第四步 – 建立第一個PHP頁面

?

/body

/html

然後我們把 first.php 保存到 WEB 根目錄 D:\Apache2\htdocs\,在瀏覽器輸入地址

這時我們在瀏覽器中看到輸出:這是我第一個使用 PHP 輸出的頁面

這裡利用了 PHP 的 echo() 語句輸出語句,等同於 ASP 中的 Response.write() .

PHP 也和 ASP 一樣在 Html 嵌入 PHP 標記,當解釋器分析一個 PHP 文件時,所有特殊標記外的普通文本,解釋器不對其做任何處理,而特殊標記內文件將作為 PHP 代碼被解釋器分析執行. PHP 標記外的內容將被完全獨立開,不做任何處理,而內部的將作為 PHP 代碼解析.

標記

? … ? // 可以在 php.ini 配置文件中開啟或關閉 short_open_tag

?php … ? // 推薦使用

script language=”php” … /script

% % // 在第二步我們講過在php.ini開啟支持Asp風格的標記 asp_tags

所以輸出變數值也可以這樣書寫 %= $value %.

指令分隔符

在PHP中用英文分號 “;” 來分隔語句,從ASP轉過來的可能沒有這樣的習慣要記住了.

結束標記 “?” 隱含語句的結束,不需要為 PHP 代碼塊的最後一行追加一個分號,所以下面的兩段代碼作用是一樣:

?php

echo “h1這是我第一個使用PHP輸出的頁面/h1”;

?

?php echo “h1這是我第一個使用PHP輸出的頁面/h1” ?

在PHP中用英文分號 “;” 來分隔語句,從ASP轉過來的可能沒有這樣的習慣要記住了.

怎麼實現定時執行某一個php文件

用JS的setTimeout(code,millisec)函數

code:執行的代碼;

millisec:多少毫秒後執行;

code可以定義一個函數使用Ajax執行需要的php文件

望採納,謝謝!

Sublime Text,php代碼格式化插件codeformatter 設置PHP代碼格式時報錯 怎麼處理

{

“codeformatter_debug”: false,

“codeformatter_php_options”:

{

“syntaxes”: “php”, // Syntax names which must process PHP formatter

“php_path”: “這裡改成你php的路徑”, // Path for PHP executable, e.g. “/usr/lib/php” or “C:/Program Files/PHP/php.exe”. If empty, uses command “php” from system environments

“format_on_save”: false, // Format on save. Either a boolean (true/false) or a string regexp tested on filename. Example : “^((?!.min.|vendor).)*$”

“php55_compat”: false, // PHP 5.5 compatible mode

“psr1”: false, // Activate PSR1 style

“psr1_naming”: false, // Activate PSR1 style – Section 3 and 4.3 – Class and method names case

“psr2”: true, // Activate PSR2 style

“indent_with_space”: 4, // Use spaces instead of tabs for indentation

“enable_auto_align”: true, // Enable auto align of = and =

“visibility_order”: true, // Fixes visibility order for method in classes – PSR-2 4.2

“smart_linebreak_after_curly”: true, // Convert multistatement blocks into multiline blocks

// Enable specific transformations. Example: [“ConvertOpenTagWithEcho”, “PrettyPrintDocBlocks”]

// You can list all available transformations from command palette: CodeFormatter: Show PHP Transformations

“passes”: [],

// Disable specific transformations

“excludes”: []

},

“codeformatter_js_options”:

{

“syntaxes”: “javascript,json”, // Syntax names which must process JS formatter

“format_on_save”: false, // Format on save. Either a boolean (true/false) or a string regexp tested on filename. Example : “^((?!.min.|vendor).)*$”

“indent_size”: 4, // indentation size

“indent_char”: ” “, // Indent character

“indent_with_tabs”: false, // Indent with one tab (overrides indent_size and indent_char options)

“eol”: “\n”, // EOL symbol

“preserve_newlines”: false, // whether existing line breaks should be preserved,

“max_preserve_newlines”: 10, // maximum number of line breaks to be preserved in one chunk

“space_in_paren”: false, // Add padding spaces within paren, ie. f( a, b )

“space_in_empty_paren”: false, // Add padding spaces within paren if parent empty, ie. f( )

“e4x”: false, // Pass E4X xml literals through untouched

“jslint_happy”: false, // if true, then jslint-stricter mode is enforced. Example function () vs function()

“space_after_anon_function”: false, // Space after anonimouse functions

“brace_style”: “collapse”, // “collapse” | “expand” | “end-expand”. put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line.

“keep_array_indentation”: false, // keep array indentation.

“keep_function_indentation”: false, // keep function indentation.

“eval_code”: false, // eval code

“unescape_strings”: false, // Decode printable characters encoded in xNN notation

“wrap_line_length”: 0, // Wrap lines at next opportunity after N characters

“unindent_chained_methods”: false, // Unindent chained method calls

“break_chained_methods”: false, // Break chained method calls across subsequent lines

“end_with_newline”: false, // Add new line at end of file

“comma_first”: false, // Add comma first

“operator_position”: “before-newline” // Operator position: before-newline, after-newline, preserve-newline

},

“codeformatter_css_options”:

{

“syntaxes”: “css,less”, // Syntax names which must process CSS formatter

“format_on_save”: false, // Format on save. Either a boolean (true/false) or a string regexp tested on filename. Example : “^((?!.min.|vendor).)*$”

“indent_size”: 4, // Indentation size

“indent_char”: ” “, // Indentation character

“indent_with_tabs”: false, // Indent with one tab (overrides indent_size and indent_char options)

“selector_separator_newline”: false, // Add new lines after selector separators

“end_with_newline”: false, // Add new line of end in file

“newline_between_rules”: false, // Add new line between rules

“space_around_combinator”: false, // Space around combinator

“eol”: “\n” // EOL symbol

},

“codeformatter_scss_options”:

{

“syntaxes”: “scss,sass”, // Indentation size

“format_on_save”: false, // Format on save. Either a boolean (true/false) or a string regexp tested on filename. Example : “^((?!.min.|vendor).)*$”

“indent_size”: 4, // Indentation size

“indent_char”: ” “, // Indentation character

“indent_with_tabs”: false, // Indent with one tab (overrides indent_size and indent_char options)

“selector_separator_newline”: false, // Add new lines after selector separators

“end_with_newline”: false, // Add new line of end in file

“newline_between_rules”: false, // Add new line between rules

“space_around_combinator”: false, // Space around combinator

“eol”: “\n” // EOL symbol

},

“codeformatter_html_options”:

{

“syntaxes”: “html,blade,asp,xml”, // Syntax names which must process HTML formatter

“format_on_save”: false, // Format on save. Either a boolean (true/false) or a string regexp tested on filename. Example : “^((?!.min.|vendor).)*$”

“formatter_version”: “bs4”, // Which formatter to use. Current options are “bs4” and “regexp”. If an error occurs while loading the bs4 formatter, the regexp formatter will automatically be used

“indent_size”: 4, // indentation size

“indent_char”: ” “, // Indentation character

“indent_with_tabs”: false, // Indent with one tab (overrides indent_size and indent_char options)

“exception_on_tag_mismatch”: false, // If the last closing tag is not at the same indentation level as the first opening tag, there’s probably a tag mismatch in the file

“expand_javascript”: false, // (Under construction) Expand JavaScript inside of script tags (also affects CSS purely by coincidence)

“expand_tags”: false, // Expand tag attributes onto new lines

“minimum_attribute_count”: 2, // Minimum number of attributes needed before tag attributes are expanded to new lines

“first_attribute_on_new_line”: false, // Put all attributes on separate lines from the tag (only uses 1 indentation unit as opposed to lining all attributes up with the first)

“reduce_empty_tags”: false, // Put closing tags on same line as opening tag if there is no content between them

“reduce_whole_word_tags”: false, // Put closing tags on same line as opening tag if there is whole word between them

“custom_singletons”: “” // Custom singleton tags for various template languages outside of the HTML5 spec

},

“codeformatter_python_options”:

{

“syntaxes”: “python”, // Syntax names which must process Python formatter

“format_on_save”: false, // Format on save. Either a boolean (true/false) or a string regexp tested on filename. Example : “^((?!.min.|vendor).)*$”

“indent_size”: 1, // indentation size

“indent_with_tabs”: true, // Indent with tabs or spaces

“max_char”: 80, // Width of output lines in characters.

“assignment”: ” = “, // This is how the assignment operator is to appear.

“function_param_assignment”: “=”, // This is how function-parameter assignment should appear.

“function_param_sep”: “, “, // This is how function parameters are separated.

“list_sep”: “, “, // This is how list items are separated.

“subscript_sep”: “=”, // This is how subscripts are separated.

“dict_colon”: “: “, // This separates dictionary keys from values.

“slice_colon”: “:”, // this separates the start:end indices of slices.

“comment_prefix”: “# “, // This is the sentinel that marks the beginning of a commentary string.

“shebang”: “#!/usr/bin/env python”, // Hashbang, a line-one comment naming the Python interpreter to Unix shells.

“boilerplate”: “”, // Standard code block (if any). This is inserted after the module doc string on output.

“blank_line”: “”, // This is how a blank line is to appear (up to the newline character).

“keep_blank_lines”: true, // If true, preserve one blank where blank(s) are encountered.

“add_blank_lines_around_comments”: true, // If true, set off comment blocks with blanks.

“add_blank_line_after_doc_string”: true, // If true, add blank line after doc strings.

“max_seps_func_def”: 3, // Split lines containing longer function definitions.

“max_seps_func_ref”: 5, // Split lines containing longer function calls.

“max_seps_series”: 5, // Split lines containing longer lists or tuples.

“max_seps_dict”: 3, // Split lines containing longer dictionary definitions.

“max_lines_before_split_lit”: 2, // Split string literals containing more newline characters.

“left_margin”: “”, // This is how the left margin is to appear.

“normalize_doc_strings”: false, // If true, normalize white space in doc strings.

“leftjust_doc_strings”: false, // If true, left justify doc strings.

“wrap_doc_strings”: false, // If true, wrap doc strings to max_char.

“leftjust_comments”: false, // If true, left justify comments.

“wrap_comments”: false, // If true, wrap comments to max_char.

“double_quoted_strings”: false, // If true, use quotes instead of apostrophes for string literals.

“single_quoted_strings”: false, // If true, use apostrophes instead of quotes for string literals.

“can_split_strings”: false, // If true, longer strings are split at the max_char.

“doc_tab_replacement”: “….”, // This literal replaces tab characters in doc strings and comments.

// Optionally preserve unassigned constants so that code to be tidied

// may contain blocks of commented-out lines that have been no-op’ed

// with leading and trailing triple quotes. Python scripts may declare

// constants without assigning them to a variables, but CodeFormatter

// considers this wasteful and normally elides them.

“keep_unassigned_constants”: false,

// Optionally omit parentheses around tuples, which are superfluous

// after all. Normal CodeFormatter behavior will be still to include them

// as a sort of tuple display analogous to list displays, dict

// displays, and yet-to-come set displays.

“parenthesize_tuple_display”: true,

// When CodeFormatter splits longer lines because max_seps

// are exceeded, the statement normally is closed before the margin is

// restored. The closing bracket, brace, or parenthesis is placed at the

// current indent level. This looks ugly to “C” programmers. When

// java_style_list_dedent is True, the closing bracket, brace, or

// parenthesis is brought back left to the indent level of the enclosing

// statement.

“java_style_list_dedent”: false

},

“codeformatter_vbscript_options”:

{

“syntaxes”: “vbscript”, // Syntax names which must process VBScript formatter

“format_on_save”: false, // Format on save. Either a boolean (true/false) or a string regexp tested on filename. Example : “^((?!.min.|vendor).)*$”

“indent_size”: 1, // indentation size

“indent_char”: “\t”, // Indentation character

“indent_with_tabs”: true, // Indent with one tab (overrides indent_size and indent_char options)

“preserve_newlines”: true, // Preserve existing line-breaks

“max_preserve_newlines”: 10, // Maximum number of line-breaks to be preserved in one chunk

“opening_tags”: “^(Function .*|Sub .*|If .* Then|For .*|Do While .*|Select Case.*)”, // List of keywords which open a new block

“middle_tags”: “^(Else|ElseIf .* Then|Case .*)$”, // List of keywords which divide a block, but neither open or close the block

“closing_tags”: “(End Function|End Sub|End If|Next|Loop|End Select)$” // List of keywords which close an open block

},

“codeformatter_coldfusion_options”:

{

“syntaxes”: “coldfusion,cfm,cfml”, // Syntax names which must process Coldfusion Markup Language formatter

“format_on_save”: false, // Format on save. Either a boolean (true/false) or a string regexp tested on filename. Example : “^((?!.min.|vendor).)*$”

“indent_size”: 2, // indentation size

“indent_char”: ” “, // Indentation character

“indent_with_tabs”: false, // Indent with one tab (overrides indent_size and indent_char options)

“exception_on_tag_mismatch”: false, // If the last closing tag is not at the same indentation level as the first opening tag, there’s probably a tag mismatch in the file

“expand_javascript”: false, // (Under construction) Expand JavaScript inside of script tags (also affects CSS purely by coincidence)

“expand_tags”: false, // Expand tag attributes onto new lines

“minimum_attribute_count”: 2, // Minimum number of attributes needed before tag attributes are expanded to new lines

“first_attribute_on_new_line”: false, // Put all attributes on separate lines from the tag (only uses 1 indentation unit as opposed to lining all attributes up with the first)

“reduce_empty_tags”: false, // Put closing tags on same line as opening tag if there is no content between them

“reduce_whole_word_tags”: false, // Put closing tags on same line as opening tag if there is whole word between them

“custom_singletons”: “” // Custom singleton tags for various template languages outside of the HTML5 spec

}

}

怎麼在linux運行php文件?

1、打開我們的linux命令行,準備好。

2、找到php的安裝目錄,主要是找到linux環境下,php可執行文件的目錄。如圖所示。筆者的目錄為/opt/lampp/bin/php,將此目錄記下,備用。

3、找到要運行的php文件所在的目錄,隨便寫點php代碼就可以,在此筆者已經準備好。/opt/lampp/htdocs/wechat/xjtest-web_browser/pcntl_test.php,將此目錄記下,接下來就要正式開始運行了。

4、打開剛剛第一步打開的linux命令行,輸入/opt/lampp/bin/php  /opt/lampp/htdocs/wechat/xjtest-web_browser/pcntl_test.php(即依次輸入剛剛的兩個目錄)注意兩個目錄中間有空格。

5、按下回車,可以看到,php文件已經正確執行了。

常見問題解答

1. 在windows下的軟體可不可以正常的運行?

不可以,不過有一個軟體叫 wine ,可以模擬運行一部分程序。他的衍生版本可以運行特定方面的軟體。比如 cedega ,可以運行很多遊戲,CS、WarCraft3 、wow 都能,但還是不夠完美。比如 wow 里部分插件導致運行緩慢(我很鬱悶的遇到了,只好進 win 玩魔獸,CS 用 OpenGL 基本完美。當然前提是你的顯卡正確安裝了驅動,打開了 3D 支持)。

2. 哪個殺毒軟體支持linux?

Avast!,Mcafee,Kaspersky和ClamAV(自由軟體,開源、免費)等。

暫時 linux 還不需要殺毒軟體,病毒很少,主要是黑客攻擊,注意設置就行了。 比如選擇針對桌面設計的版本,來減少過多服務程序導致安全隱患。

3. 在Linux是不是可以聽歌的啊?

可以。絕對可以,而且Linux下的軟體很早就入侵Windows了。

ffmpeg 解碼器庫就是linux下的,Mplayer 也是linux 里的。(注意不是windows 里的那個韓國的KMPlayer ,Linux 里的KMPlayer是一個Mplayer的KDE界面程序)

4. QQ可不可以在Linux運行啊?

騰訊官方已發布QQ for Linux beta1(於2009年1月4日發布),但功能尚且比較簡單,可以支持屏幕截圖,語音聊天。目前不支持群管理,群空間等高級屬性。已經可以支持紅旗 linux桌面版6.0,對最新的suse linux 11.1的支持也非常好。其他的可以選擇的開源解決方案還有eva,lumaQQ和pidgin。目前eva的功能較強大。(參見: )

5. linux下最強大的程序調試器是?

Totalview debugger是迄今為止最強大的可以運行在linux下的調試工具,它的圖形化調試界面,強大的多線程、內存調試能力令眾多同類調試工具都黯然失色!Totalview debugger可以讓您徹底拋棄手敲命令的煩惱,讓您的開發過程變得輕鬆便捷!

linux,php 文件屬性設置原則是什麼?什麼情況下設文件屬性可讀、可寫、可執行等。

Linux默認情況下建立一個文件時文件擁有者擁有可讀寫的權利,和擁有者同組的和其他組的用戶對文件只有讀的權利。用ls -l命令可以看出除開最開始一位,接下來的三位為一組分別對應文件擁有者,和擁有者同組和其他用戶組用戶對文件的操作權利。如一個普通文件的屬性可能是:-rw-r–r– 1 root root …,如果可執行,那麼rw後面是x。第一個root表示文件的擁有者,第二個root表示文件擁有者所在組。具體的命令可以查chmod和chown。

原創文章,作者:小藍,如若轉載,請註明出處:https://www.506064.com/zh-tw/n/186726.html

(0)
打賞 微信掃一掃 微信掃一掃 支付寶掃一掃 支付寶掃一掃
小藍的頭像小藍
上一篇 2024-11-27 05:48
下一篇 2024-11-27 05:48

相關推薦

  • PHP和Python哪個好找工作?

    PHP和Python都是非常流行的編程語言,它們被廣泛應用於不同領域的開發中。但是,在考慮擇業方向的時候,很多人都會有一個問題:PHP和Python哪個好找工作?這篇文章將從多個方…

    編程 2025-04-29
  • PHP怎麼接幣

    想要在自己的網站或應用中接受比特幣等加密貨幣的支付,就需要對該加密貨幣擁有一定的了解,並使用對應的API進行開發。本文將從多個方面詳細闡述如何使用PHP接受加密貨幣的支付。 一、環…

    編程 2025-04-29
  • 使用PHP foreach遍歷有相同屬性的值

    本篇文章將介紹如何使用PHP foreach遍歷具有相同屬性的值,並給出相應的代碼示例。 一、基礎概念 在講解如何使用PHP foreach遍歷有相同屬性的值之前,我們需要先了解幾…

    編程 2025-04-28
  • PHP獲取301跳轉後的地址

    本文將為大家介紹如何使用PHP獲取301跳轉後的地址。301重定向是什麼呢?當我們訪問一個網頁A,但是它已經被遷移到了另一個地址B,此時若伺服器端做了301重定向,那麼你的瀏覽器在…

    編程 2025-04-27
  • Ubuntu安裝Code::Blocks教程

    本文將為大家詳細介紹在Ubuntu系統下如何安裝Code::Blocks。Code::Blocks是一款開源、跨平台的C++集成開發環境(IDE),它可以在Windows、Linu…

    編程 2025-04-27
  • PHP登錄頁面代碼實現

    本文將從多個方面詳細闡述如何使用PHP編寫一個簡單的登錄頁面。 1. PHP登錄頁面基本架構 在PHP登錄頁面中,需要包含HTML表單,用戶在表單中輸入賬號密碼等信息,提交表單後服…

    編程 2025-04-27
  • PHP與Python的比較

    本文將會對PHP與Python進行比較和對比分析,包括語法特性、優缺點等方面。幫助讀者更好地理解和使用這兩種語言。 一、語法特性 PHP語法特性: <?php // 簡單的P…

    編程 2025-04-27
  • PHP版本管理工具phpenv詳解

    在PHP項目開發過程中,我們可能需要用到不同版本的PHP環境來試驗不同的功能或避免不同版本的兼容性問題。或者我們需要在同一台伺服器上同時運行多個不同版本的PHP語言。但是每次手動安…

    編程 2025-04-24
  • PHP數組去重詳解

    一、array_unique函數 array_unique是php中常用的數組去重函數,它基於值來判斷元素是否重複,具體使用方法如下: $array = array(‘a’, ‘b…

    編程 2025-04-24
  • PHP導出Excel文件

    一、PHP導出Excel文件列寬調整 當我們使用PHP導出Excel文件時,有時需要調整單元格的列寬。可以使用PHPExcel類庫中的setWidth方法來設置單元格的列寬。下面是…

    編程 2025-04-24

發表回復

登錄後才能評論