text
stringlengths 1
254
| output
stringlengths 2
255
|
---|---|
The biggest drawback of ASP is that it' s a proprietary system that is natively used only on Microsoft Internet Information Server (IIS).
|
PHPã¯ãŠã§ãããã°ã©ãã³ã°ãããã«ã¯æé«ã®èšèªã§ããããä»ã®èšèªã¯ã©ããªã®ã§ ããããïŒ
|
InstantASP from Halcyon (commercial), Chili!Soft ASP from Chili!Soft (commercial) and OpenASP from ActiveScripting.org (free).
|
1. PHP vs. ASP?
|
The components built in ASP are really limited, so if you need to use "advanced" features like interacting with FTP servers, you need to buy additional components.
|
2. ASPããPHPãžã®ã³ã³ããŒã¿ã¯ãããŸããïŒ
|
Yes, asp2php is the one most often referred to.
|
ã¯ãã asp2php ãæåã§ãã
|
PHP is generally referred to as more stable and less resource intensive as well.
|
3. PHP vs. Cold Fusion?
|
Cold Fusion has a good IDE and is generally easier to get started with, whereas PHP initially requires more programming knowledge.
|
Michael J Sheldonã«ãããã®ãããã¯ã«é¢ãããã°ããããµããªãPHPã®ã¡ãŒãª ã³ã°ãªã¹ãã«æçš¿ãããŸããã ã ã ã§ãã®å
容ãèªãããšãã§ããŸãã
|
A great summary by Michael J Sheldon on this topic has been posted to the PHP mailing list.
|
4. PHP vs. Perl?
|
The best way is the mailing lists.
|
ãã®ã»ã¯ã·ã§ã³ã§ã¯PHPã®ã³ãã¥ããã£ãžã®åå ã«é¢ãã質åãæ±ããŸãã æè¯ã®æ¹æ³ã¯ã¡ãŒãªã³ã°ãªã¹ãã«åå ããããšã§ãã
|
Are there any PHP mailing lists?
|
1. PHPã®ã¡ãŒãªã³ã°ãªã¹ãã¯ãããŸããïŒ
|
A whole list of mailing lists can be found on our Support page.
|
ãã¡ããã§ãïŒæ§ã
ãªãããã¯ã«é¢ããããããã®ã¡ãŒãªã³ã°ãªã¹ãã ãããŸããã¡ãŒãªã³ã°ãªã¹ãã®äžèЧãç§ãã¡ã® ãµããŒãããŒãž ã«ãããŸãã
|
You don 't need to include anything special in the subject or body of the message.
|
æãäžè¬çãªã¡ãŒãªã³ã°ãªã¹ãã php-general ã§ãã åå ããã«ã¯ [email protected] ã«ã¡ãŒã«ãéã£ãŠãã ãããSubjectãæ¬æã«ã¯äœãèšè¿°ããå¿
èŠã¯ã ããŸãããè±éããã«ã¯ [email protected] ã«ã¡ãŒã«ãéä¿¡ããŠãã ããã
|
You can also subscribe and unsubscribe using the web interface on our Support page.
|
ãŸããç§ãã¡ã® ãµããŒãããŒãž ã éããŠåå /è±éãè¡ãããšãã§ããŸãã
|
Are there any other communities?
|
2. ä»ã«ã³ãã¥ããã£ã¯ãããŸããïŒ
|
We have links for example to some IRC servers and foreign language mailing lists on our Support page.
|
äžçäžã«æ°ãåããªãã»ã©ãããŸãã ãµããŒãããŒãž ã«ã¯äŸãšããŠããã€ãã® IRCãµãŒããä»ã®åœã®ã¡ãŒãªã³ã°ãªã¹ããžã®ãªã³ã¯ããããŸãã
|
I can 't seem to subscribe / unsubscribe to / from one of the mailing lists!
|
3. Help!ã¡ãŒãªã³ã°ãªã¹ãã«åå /è±éã§ããŸããïŒ
|
There is also an experimental web interface for the news server at http: / /news.php.net /
|
4. ã©ããã«ã¡ãŒãªã³ã°ãªã¹ãã®ã¢ãŒã«ã€ã(éå»ãã°)ã¯ãããŸããïŒ
|
Because of this it is in everyones interest that you use the list as a last resort when you have looked everywhere else.
|
ã¯ãã ãµããŒãããŒãž ã« ã¢ãŒã«ã€ããµã€ãã®äžèЧããããŸãããŸããã¡ãŒãªã³ã°ãªã¹ãã®èšäºã¯ newsã¡ãã»ãŒãžãšããŠãèšé²ãããŠããŸãããã¥ãŒã¹ã¯ã©ã€ã¢ã³ãã§ news://news.php.net/ ãžã¢ã¯ã»ã¹ããããšãã§ããŸããããã«ã http://news.php.net/ ã«å®éšçãªnewsãµãŒããžã®Webã€ã³ã¿ãŒãã§ãŒã¹ããããŸãã
|
If you' re having problem with installing or configuring PHP please read through all included documentation and README's.
|
5. ã¡ãŒãªã³ã°ãªã¹ãã§ã¯ã©ããªè³ªåãããããšãã§ããã®ã§ããïŒ
|
Before asking questions, you may want to read the paper on How To Ask Questions The Smart Way as this is a good idea for everyone.
|
PHPãæ¥é²ææ©ã§æåã«ãªã£ãŠãã圱é¿ã§ãphp-general ã¡ãŒãªã³ã°ãªã¹ãã®æµ éãå¢å ããŠããŸã(ä»ã®ãšããã1æ¥ããã150ã200éã®æµéããããŸã)ã㪠ã®ã§ãåå è
å
šå¡ã®å©çã®ããã«ãã¡ãŒãªã³ã°ãªã¹ãã¯ä»ã®ã©ããåœãã£ãŠãé§ ç®ã ã£ãå Žåã®æåŸã®ææ®µã«ããŠãã ããã
|
If you' re having problems with your source code you need to include the part of the code that isn't working.
|
6. ã¡ãŒãªã³ã°ãªã¹ãã«æçš¿ãããšãã«ã¯ãã©ããªæ
å ±ãå«ããã°ããã®ã§ããïŒ
|
It makes the post hard to read and a lot of people might just skip it all together because of this.
|
ãPHPãåäœããŸãããå©ããŠïŒäœãããããã®ã§ããïŒããšãã£ãæçš¿ã¯éé ããªã誰ã«ãšã£ãŠãç¡æå³ãªãã®ã§ããããPHPãåäœããªãã®ã§ããã°ãã㪠ãã䜿çšããŠãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãPHPã®ããŒãžã§ã³ããŸããããã© ã®ããã«æã«å
¥ããã(ã³ã³ãã€ã«æžã¿ã ã£ããCVSããæã«å
¥ãããRPMã§æäŸ ããããã®ã ã£ããç)ãåäœãããããšããŠããªãã¯ã©ããªããšãããã®ãã ã©ãã§ããªãã¯è¡ãè©°ãŸã£ãŠãã©ããªãšã©ãŒã¡ãã»ãŒãžãåºãã®ãããšãã£ãæ
å ±ãèšè¿°ããå¿
èŠããããŸãã
|
And lastly, you 're encouraged to read the paper on How To Ask Questions The Smart Way as this will be a great help for everyone, especially yourself.
|
ããäžã€éèŠãªç¹ããããŸããããã¯Subjectã§ããªãã®åé¡ã端çã«è¡šãããš ã§ãããå©ããŠãŒãŒïŒããšããäœãããããã®ã§ããããïŒããšãã£ãSubject ã®ã€ããã¡ãŒã«ã¯ã»ãšãã©äººã«ç¡èŠãããŠããŸããŸãã
|
Legendary PHP 1.0, PHP / FI, PHP 3.0 and PHP 4.0.
|
PHPã«ã¯ãã§ã«é·ãæŽå²ããããŸãããã®PHP 1.0, PHP/FI, PHP 3.0 ãã㊠PHP 4.0ã§ãã
|
Migrating from PHP3 to PHP4
|
1. PHP 3ããPHP 4ãžã®ç§»è¡ã«é¢ããŠ
|
If you 're really unsure about compatibility you should install PHP 4 in a test environment and run your scripts there.
|
PHP 4ã¯ä»¥åã®ããŒãžã§ã³ãšã§ããéãã®äºææ§ãä¿ã€ããã«ãã¶ã€ã³ãããŠã ãŠã倱ãããçžé¢æ§ã¯æ¥µãããã§ããããäºææ§ã«äžå®ãããå Žåã¯PHP 4ãã ã¹ãç°å¢ã«ã€ã³ã¹ããŒã«ããŠã¿ãŠã¹ã¯ãªãããå®è¡ããŠã¿ãŠãã ããã
|
2.
|
ãŸããããã¥ã¢ã«ã® ç§»è¡ã«é¢ããä»é²ã®é©åãªç®æ ãåç
§ããŠãã ããã
|
Incompatible functions?
|
2. 颿°ã®äºææ§ã¯ïŒ
|
Prev
|
PHP 4ã¯åºæ¬çã«PHPã®ãšã³ãžã³éšåãå®å
šã«æžãçŽããŠãã®ã§ããããã倿Žã ãã颿°ã¯æ¥µãããã§ãã
|
Legendary PHP 1.0, PHP / FI, PHP 3.0 and PHP 4.0.
|
PHPã«ã¯ãã§ã«é·ãæŽå²ããããŸãããã®PHP 1.0, PHP/FI, PHP 3.0 ãã㊠PHP 4.0ã§ãã
|
Migrating from PHP 2 to PHP 3?
|
1. PHP 2ããPHP 3ãžã®ç§»è¡ã«é¢ããŠ
|
Please see appropriate manual section for information about migration from PHP / FI 2.0.
|
PHP/FI 2.0ã¯ãããµããŒããããŠããŸãããPHP/FI 2.0ããã®ç§»è¡ã«é¢ããŠã¯ ç§»è¡ã«é¢ããä»é²ã®è©²åœã»ã¯ã·ã§ã³ ãå ç
§ããŠãã ããã
|
Prev
|
ããããªãããŸã PHP 2ã䜿çšããŠããå Žåãç§ãã¡ã¯(PHP 3ã§ã¯ãªã)PHP 4ãž ã®ã¢ããã°ã¬ãŒãã 匷ã ãå§ãããŸãã
|
Here you can find them.
|
ããã§ã¯ä»ã®ã«ããŽãªã«åé¡ããããšãã§ããªããããªè³ªåãæ±ããŸãã
|
The yellow pop-up windows on the old site were pretty cool, but were very difficult to maintain (since some companies seem to enjoy changing the way their browsers work with every new release).
|
1. 以åã®ãŠã§ããµã€ãã«ãã£ããããã¢ãããŠã£ã³ããŠã¯ã©ããžè¡ã£ãŠããŸã£ã ã®ã§ããïŒ ãã®ãœãŒã¹ã³ãŒããæã«å
¥ããããšãã§ããŸããïŒ
|
Specifically, the last version of shared.inc (that had all the Javascript and DHTML to do the popups) is available here.
|
åã®ãµã€ãã®é»è²ããããã¢ãããŠã£ã³ããŠã¯ããªããã£ãããã£ãã®ã§ããã åæã«ã¡ã³ããã³ã¹ãå°é£ã§ããããŸãã(ãªããªãããšããäŒç€Ÿã¯ãªãªãŒã¹ã® 床ã«ãã©ãŠã¶ã®æåãå€åãããã®ã楜ããã§ããç¯ãããããã§ã)ã
|
If you don' t have an archiver-tool to handle bz2 files download the commandline tool from Redhat (please find further information below).
|
以åã®ããŒãžã§ã³ã§äœ¿çšãããŠãããŠã§ããµã€ãã®ãœãŒã¹ã³ãŒãã¯ãCVSãéã ãŠçŸåšãæã«å
¥ããããšãã§ããŸããç¹ã«ãååã®ããŒãžã§ã³ã®shared.inc(ã ã®ãã¡ã€ã«ã«ã¯ãããã¢ããã®ããã®å
šãŠã®JavascriptãšDHTMLãå«ãŸããŠã㟠ã)㯠ãã ããæã«å
¥ããããšãã§ã㟠ãã
|
If you have tools like WinRAR or Power Archiver, you can easily decompress the bz2 files with it.
|
2. bz2ã§å§çž®ãããWindowsããã¥ã¢ã«ã¯ã©ã®ããã«æ±ãã°ããã®ã§ããïŒ
|
The bzip2 commandline tool from Redhat:
|
bz2ãæ±ãããšãã§ããã¢ãŒã«ã€ãããŒã«ãç¡ãå Žåã¯Redhatããç§»æ€ããã ã³ãã³ãã©ã€ã³ããŒã«ã ããŠã³ããŒã ããŠäžãããWindows 2000 SP2ã®ãŠãŒã¶ã¯ããŒãžã§ã³1.0.2ããä»ã®å
šãŠã® WindowsãŠãŒã¶ã¯ããŒãžã§ã³1.0.0ã䜿çšããŠãã ãããããŠã³ããŒãããã å®è¡ãã¡ã€ã«ã®ååã bzip2.exe ãžå€æŽããŠãã ããããããŠããã ãã¹ã®éã£ããã£ã¬ã¯ããªãäŸãã°C:\Windows(ãã©ã€ãåã¯è²Žæ¹ã® ã·ã¹ãã ã«ããããŠé©å®å€æŽããŠãã ãã)ãžã³ããŒããŠãã ããã
|
After downloading rename the executable to bzip2.exe.
|
php_manual_lang.x.bz2ãè§£åããã«ã¯ä»¥äžã®ããã«ããŸãã
|
C:\Windows where C represents your windows installation drive.
|
ã³ãã³ãããã³ãããŠã£ã³ããŠãéããŸã
|
To uncompress the php_manual_lang.x.bz2 follow these simple instructions:
|
ããŠã³ããŒãããphp_manual_lang.x.bz2ãä¿åãããã£ã¬ã¯ããªã« cdã³ãã³ãã䜿çšããŠç§»åããŸãã
|
cd to the folder where you stored the downloaded php_manual_lang.x.bz2
|
bzip2 -d php_manual_lang.x.bz2 ãå®è¡ãããš php_manual_lang.x ãšãããã¡ã€ã«ãåããã£ã¬ã¯ããªã«çæãããŸãã
|
In case you downloaded the php_manual_lang.tar.bz2 with many html-files in it, the procedure is the same.
|
åå²HTMLçã¢ãŒã«ã€ã(php_manual_lang.tar.bz2)ãããŠã³ããŒãããå Žå ã§ãæé ã¯åãã§ããå¯äžã®éãã¯ãbzip2ã³ãã³ãã®å®è¡åŸã« php_manual_lang.tarãçæãããããšã§ããtar圢åŒã®ãã¡ã€ã«ã¯ WinZip ãšãã£ãã¢ãŒã«ã€ãã§ æ±ãããšãã§ããŸãã
|
The tar format is known to be treated with most common archivers on Windows like e.g.
|
ã³ãã³ãã©ã€ã³ããŒã«ã䜿ããããªãå Žåã¯ã Stuffit Expander ã䜿çšããããšãã§ããŸã(ããããOSã§å®è¡ å¯èœã§ã)ããã WinRAR ãæã£ãŠãã ãªãç°¡åã«bz2ãã¡ã€ã«ãè§£åã§ããŸããWindows Commanderã䜿çšããŠãã å Žåã¯bz2çšã®ãã©ã°ã€ã³ã Windows Commander ã®ãµã€ãããç¡æã§æã«å
¥ããããšãåºæ¥ãŸãã
|
This section has details about PHP download locations, and OS issues.
|
ãã®ã»ã¯ã·ã§ã³ã«ã¯PHPãããŠã³ããŒããã詳ããå ŽæããOSã«é¢ãã話é¡ãæ±ã ãŸãã
|
Where can I obtain PHP?
|
1. PHPã¯ã©ãã§æã«å
¥ããããšãã§ããŸããïŒ
|
For more information, go to http: / /cvs.php.net /.
|
PHPãããã¯ãŒã¯ã®ã©ã®ã¡ã³ããŒã®ãµã€ãããã§ãããŠã³ããŒãããããšãã§ã ãŸããããã㯠http://www.php.net/ ããèŠã€ããããšãã§ããŸãããŸãå¿å CVSã䜿ã£ãŠææ°ã®ãœãŒã¹ã³ãŒããæã«å
¥ããããšãã§ããŸãã詳ããæ
å ±ã¯ã http://cvs.php.net/ ãåç
§ããŠãã ããã
|
Are pre-compiled binary versions available?
|
2. ã³ã³ãã€ã«æžã¿ã®ããŒãžã§ã³ã¯ãããŸããïŒ
|
Windows binaries can be downloaded from our Downloads page, for Linux binaries, please visit your distributions website.
|
ç§ãã¡ã¯Windowsçã®ã¿ã³ã³ãã€ã«æžã¿ã®ãã€ããªãé
åžããŠããŸãããšããã® ãPHPããã¹ãŠã®Linux/Unixã®ãã©ããããŒã çšã«ãã¹ãŠã®æ¡åŒµã¢ãžã¥ãŒã«ã®çµ ã¿åããã§ã³ã³ãã€ã«ããã®ã¯äžå¯èœã ããã§ãããã ãæè¿ã®å€ãã®Linuxã㣠ã¹ããªãã¥ãŒã·ã§ã³ã«ã¯äºãPHPãã€ã³ã¹ããŒã«ãããŠããŸããWindowsçšã®ã〠ããªã¯ ããŠã³ããŒãããŒãž ããããŠã³ããŒãããããšãã§ããŸããLinuxçšã®ã ã€ããªã«ã€ããŠã¯ããªãã䜿çšããŠãããã£ã¹ããªãã¥ãŒã·ã§ã³ã®ãŠã§ããµã€ã ã蚪ããŠãã ããã
|
Where can I get libraries needed to compile some of the optional PHP extensions?
|
3. äžéšã®PHPæ¡åŒµã¢ãžã¥ãŒã«ã®ã³ã³ãã€ã«ã«å¿
èŠãªã©ã€ãã©ãªã¯ã©ãã§æã«å
¥ã㟠ããïŒ
|
This does not matter in Unix environments, yet.
|
泚æ *å°ãã€ããŠãããã®ã¯ã¹ã¬ããã»ãŒããªã©ã€ãã©ãªã§ã¯ãªããããWindowsçš ã®ãã«ãã¹ã¬ãããªãŠã§ããµãŒã(IIS, Netscape)ã®ãµãŒãã¢ãžã¥ãŒã«ãšã㊠ã³ã³ãã€ã«ãããPHPã§äœ¿çšããŠã¯ãããŸãããçŸåšã®ãšããUnixç°å¢ã§ã¯é¢ ä¿ãããŸããã
|
LDAP (Unix).
|
LDAP (unix).
|
LDAP* (Unix).
|
LDAP* (unix).
|
Netscape Directory (LDAP) SDK 1.1.
|
LDAP (unix/win): Netscape Directory (LDAP) SDK 1.1.
|
free LDAP server.
|
free LDAP server.
|
Berkeley DB2 (Unix / Win): http: / /www.sleepycat.com /.
|
Berkeley DB2 (Unix/Win): http://www.sleepycat.com/.
|
SNMP* (Unix):.
|
SNMP* (Unix):.
|
GD* (Unix / Win).
|
GD* (Unix/Win).
|
mSQL* (Win).
|
mSQL* (Win).
|
mSQL* (Unix).
|
mSQL* (Unix).
|
PostgreSQL (Unix).
|
MySQL (Unix).
|
IMAP* (Win / Unix).
|
PostgreSQL (Unix).
|
Available locally.
|
IMAP* (Win/Unix).
|
FreeType (libttf):.
|
Sybase-CT* (Linux, libc5): Available locally.
|
ZLib (Unix / Win32).
|
FreeType (libttf):.
|
expat XML parser (Unix / Win32).
|
ZLib (Unix/Win32).
|
PDFLib.
|
expat XML parser (Unix/Win32).
|
mcrypt.
|
PDFLib.
|
mhash.
|
mcrypt.
|
t1lib.
|
mhash.
|
dmalloc.
|
t1lib.
|
aspell.
|
dmalloc.
|
readline.
|
aspell.
|
How do I get these libraries to work?
|
readline.
|
Some of these libraries are detected automatically when you run the 'configure' script of PHP (such as the GD library), and others you will have to enable using '--with-EXTENSION' options to 'configure'.
|
4. äžèšã®ã©ã€ãã©ãªã¯ã©ã®ããã«äœ¿ãã®ã§ããïŒ
|
I got the latest version of the PHP source code from the CVS repository on my Windows machine, what do I need to compile it?
|
åã
ã®ã©ã€ãã©ãªã§æäŸãããæ
å ±ã«åŸã£ãŠãã ãããããã€ãã®ã©ã€ãã©ãª (GDç)ã¯ãPHPã®configureã¹ã¯ãªããå®è¡æã«èªåçã«æ€åºãããŸãããã®ä»ã® ã©ã€ãã©ãªã«é¢ããŠã¯ configure ã¹ã¯ãªããã®ãªãã·ã§ã³ã« '--with-EXTENSION 'ãªãã·ã§ã³ã远å ããããšäœ¿çšã§ããŸãã' configure --help 'ãå®è¡ãããšãããã®ãªãã·ã§ã³äžèЧã 衚瀺ãããŸãã
|
See the manual section about building PHP from source on Windows.
|
5. CVSãªããžããªããææ°ã®PHPãœãŒã¹ã³ãŒããæã«å
¥ããŸãããWindowsäžã§ã³ã³ ãã€ã«ããã«ã¯ã©ããããããã§ããïŒ
|
Where do I find the Browser Capabilities File?
|
ãŸããMicrosoft Visual C++ v6ãå¿
èŠã§ã(v5ã§ãåé¡ãªããããããŸãããã v6ã䜿ã£ãŠãã ãã)ãå ããŠãããã€ãã®ãã¡ã€ã«ãå¿
èŠã§ããããã¥ã¢ã«ã® ãœãŒã¹ããã®æ§ç¯ ãåç
§ããŠãã ããã
|
You can find a browscap.ini file at http: / /www.garykeith.com / browsers / downloads.asp.
|
6. ãã©ãŠã¶ãã£ãããªãã£ãã¡ã€ã«ã¯ã©ãã§æã«å
¥ããŸããïŒ
|
Mailing lists
|
browscap.ini ãã¡ã€ã«ã¯ http://www.garykeith.com/browsers/downloads.asp ã§æã«å
¥ããã ãšãã§ããŸãã
|
pre ?php echo "This should be the first line .";? ?php echo "This should show up after the new line above .";? / pre
|
ãã®ã»ã¯ã·ã§ã³ã«ã¯PHPã¹ã¯ãªãããæžãã«ããã£ãŠããåé¡ãšãªãäºæã éããããŠããŸãã
|
How do I know which POST method variables are available?
|
1. ãããããã©ãŒã ããéä¿¡ãããããŒã¿ãæ±ãããšãã§ããæ±çšç㪠PHPã¹ã¯ãªãããæžãããã®ã§ãããPOSTã¡ãœããã§ã©ã®ãããªããŒã¿ ãéä¿¡ãããããç¥ãã«ã¯ã©ãããã®ã§ããïŒ
|
So, to write a generic script to handle POST method variables you would need something similar to the following:
|
ãŸãã php.ini ã§ track_vars ãæå¹ã«ãªã£ãŠããããš ã確èªããŠãã ãããPHP 4.0.3以éã§ã¯ãã®èšå®å€ã¯åžžã«onã§ãã track_vars ãonã«ãªã£ãŠãããšPHPã¯ããã€ãã®é£ æ³é
åãçæããŸãããã®ãã¡æãéèŠãªã®ã $HTTP_POST_VARS ã§ãããšèšãããã§ãPOSTã¡ãœã ãã«ããéä¿¡ãããããŒã¿ãæ±ãæ±çšçãªã¹ã¯ãªãããæžãã«ã¯ãä»¥äž ã®ããã«ããŸãã
|
How can I do this with a regular expression?
|
2. ã·ã³ã°ã«ã¯ãªãŒã(')ãããã¯ã¹ã©ãã·ã¥ã§ãšã¹ã±ãŒãããã ã·ã³ã°ã«ã¯ãªãŒã(\')ã«å€æããªããã°ãªããªãã®ã§ããã æ£èŠè¡šçŸãçšããŠãããè¡ãã«ã¯ã©ã®æ§ã«ããã®ã§ããïŒ
|
To be able to use the results of your function in an expression (such as concatenating it with other strings in the example above), you need to return() the value, not echo() it.
|
ãŸãã¯ããã«ã addslashes() ãèŠãŠã¿ãŠãã ããã ãã®é¢æ°ã¯ãŸãã«ãã®éãã®ããšãè¡ã£ãŠãããŸãããããšã php.ini ãã¡ã€ã«ã®èšå®å€ magic_quotes_gpc ãåç
§ã ãŠãã ããã
|
pre ?php echo "This should be the first line .";? ?php echo "This should show up after the new line above .";? / pre
|
3. 次ã®ãããªã³ãŒããå®è¡ãããšãæã£ãéãã®é çªã§åºåã衚瀺ãã㟠ããã
|
So in the example above, the echoed sentences will be on one line, because PHP omits the newlines after the block ending.
|
åŒã®äžã§é¢æ°ã®å®è¡çµæã䜿çšãã(äŸãã°äžã®äŸã®æ§ã«ä»ã®æååãš é£çµãã)ããã«ã¯ã echo() ããã®ã§ã¯ãªãããã® å€ã return ããªããã°ãããŸããã
|
Why does PHP do this?
|
4. æ¹è¡ãããªãã®ã§ããïŒ
|
5.
|
PHPã§ã¯ã"? "ã"? \n"(\nã¯æ¹è¡ã衚ããŸã)ãPHPã®ã³ãŒãããã ã¯ã®çµç«¯ãšèŠãªããŸãããã®ãããã³ãŒããããã¯çµç«¯ã®æ¹è¡èšå·ã¯ç ç¥ããã衚瀺ãããæã¯1è¡ã«ãªããŸããã€ãŸããæ¹è¡ããããããã« ã¯ãPHPã®ã³ãŒããããã¯ã®çµç«¯ã®åŸã«ãã1ã€æ¹è¡ãæ¿å
¥ããå¿
èŠãã ããšããããšã§ãã
|
Cannot send session cookie - headers already sent.. .' or'Cannot add header information - headers already sent... '.
|
ãªãPHPã¯ãã®ãããªããšãããã®ã§ããããïŒãªããªãHTMLãåºåãã å Žåã«ã¯ãã®æ¹ãéœåã®ããããšãå€ãããã§ãããããšãŠãé·ã1è¡ã åºåããªããã°ãªããªãå Žåã«ãæ¹è¡ãè§£éãããŠããŸããšãããã©ã ã§ãããããœãŒã¹ã³ãŒãã®1è¡ããšãŠãèªããªããããé·ããã®ã«ãªã£ãŠ ããŸããŸãã
|
But headers can only be sent before all other content, check if your script is sending headers after having already sent content.
|
5. 'Warning: Cannot send session cookie - headers already sent...'ã 'Cannot add header information - headers already set...'ãšãã£ã ã¡ãã»ãŒãžãåºåãããã®ã§ããã sent...'.
|
$headers = getallheaders(); foreach ($headers as $name = $content) {echo "headers[$name] = $content br \n";}
|
header(), set_cookie() ã ã»ãã·ã§ã³é¢æ°ã¯åºåã¹ããªãŒã ã«ããããä»å ãã颿°ã§ããããã éä¿¡ã§ããã®ã¯æ¬æã®åºåãéå§ããåã®ã¿ã§ããããã¯Apacheã¢ãžã¥ãŒã« çã®PHPãå®è¡ããŠããå Žåã¯ä»¥äžã®ãããªã³ãŒãã§è²Žæ¹ãéä¿¡ããŠãã å
šãŠã®ãªã¯ãšã¹ããããã衚瀺ããããšãåºæ¥ãŸãã
|
The security model of IIS is at fault here.
|
6. ãªã¯ãšã¹ããããã«çŽæ¥ã¢ã¯ã»ã¹ãããã®ã§ãããã©ãããã°ããã§ããïŒ
|
Then use a META tag to redirect to the PHP page, or have a link to the PHP page.
|
ããPHPãApacheã¢ãžã¥ãŒã«ãšããŠåäœããŠãããªãã getallheaders() ã䜿ãã°å
šãŠã®ããããååŸãã ããšãã§ããŸããäžã®ã¡ãã£ãšããã³ãŒãã§å
šãŠã®ãªã¯ãšã¹ããããã 衚瀺ããããšãã§ããŸãã
|
For more information, see: http: / /support.microsoft.com / support / kb / articles / q160 / 4/22.asp.
|
7. IISã§èªèšŒãè¡ãããšãããš'No Input file specified'ãšãããšã©ãŒã çºçããŸãã
|
Running your html output through a html validator, such as validator.w3.org, might be helpful.
|
8. ç§ãæžããPHPã¹ã¯ãªããã¯IEãšLynxã§ã¯åäœããã®ã§ãããNetscapeã 䜿ããšåºåã®äžéšã倱ãããŠããŸããŸãã"ãœãŒã¹ã®è¡šç€º"ããããšIEã«ã¯ ãããNetscapeã«ã¯ãªãå
容ããããŸãã
|
The best way to check for this is to compile the command line The best way to check for this is to compile the command line version of PHP (also known as the CGI version) and run your script from the command line.
|
Netscapeã¯HTMLã¿ã°ã®æ±ããIEã«æ¯ã¹ãŠå³å¯ã«ãªã£ãŠããŸã(ããŒãã«ç)ã ã¹ã¯ãªãããåºåããHTMLã validator.w3.org ãªã©ã®HTMLããªããŒã¿ã«æããŠã¿ããšè¯ãã§ãããã äŸãã° /table ãç¡ããšãã®ãããªçŸè±¡ãçºçããŸãã
|
You could even use a File section to do this selectively.
|
9. ã©ãããã°XMLãšPHPã¯å
±åããããšãåºæ¥ãã®ã§ããïŒXMLã® ?xml ã¿ã°ãPHPã§ãšã©ãŒã«ãªããŸãã
|
One of the easiest things to do is to enable using ASP tags in your PHP code.
|
php.ini ãã¡ã€ã«ã® short_tags ã0ã«èšå®ãããã Apacheãã£ã¬ã¯ãã£ãã䜿ã£ãŠã·ã§ãŒãã¿ã°ãç¡å¹ã«ããªããã°ãªã㟠ããããŸãã File ã»ã¯ã·ã§ã³ã䜿ã£ãŠãã¡ã€ã«ããšã«éžæçã« èšå®ãè¡ãããšãåºæ¥ãŸãã
|
To enable the ASP-style tags, you need to set the asp_tags php.ini variable, or use the appropriate Apache directive.
|
10. FrontPageããã®ä»ã®HTMLãšãã£ã¿ã䜿ããšãæžããPHPã®ã³ãŒããåæ ã«ãã¡ãã¡ã«ç§»åãããŠããŸããŸããã©ããããããã§ããïŒ
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.