Le 04/12/2013 02:33, Bob Proulx a écrit : > François Patte wrote:
> Think back... How many times have someone asked you for help with > something. And you asked them what did they do? And they said, "I > didn't do anything!" And of those times how often did it turn out > that they had actually done something? I am sure quite often! :-) > I am certain that others reading this will go, yes, many times. > >>>> But php is not working...ie.: >>>> >>>> <? > > And I see that the problem turned out that you were expecting short > tags to work and those have been discouraged for years. Glad to see > that the root cause of the problem is solved. I know you think that > short tags should be on by default but really those are official > "discouraged". > > http://php.net/manual/en/language.basic-syntax.phptags.php > PHP tags > > When PHP parses a file, it looks for opening and closing tags, which > are <?php and ?> which tell PHP to start and stop interpreting the > code between them. Parsing in this manner allows PHP to be embedded > in all sorts of different documents, as everything outside of a pair > of opening and closing tags is ignored by the PHP parser. > > PHP also allows for short open tags <? and ?> (which are discouraged > because they are only available if enabled with short_open_tag php.ini > configuration file directive, or if PHP was configured with the > --enable-short-tags option. > > And this is a reasonable discussion of short tags too: > > > http://stackoverflow.com/questions/200640/are-php-short-tags-acceptable-to-use But in php.ini file (from debian), we can read: ; short_open_tag ; Default Value: On<------------------ ; Development Value: Off ; Production Value: Off I am not making any development, I have no web server in production, I just use the web server on my computer to check some web files before puting them on the university web server... Reading this at the beginning of php;ini file, I thought that short tags were enabled by default... -- François Patte UFR de mathématiques et informatique Laboratoire CNRS MAP5, UMR 8145 Université Paris Descartes 45, rue des Saints Pères F-75270 Paris Cedex 06 Tél. +33 (0)1 8394 5849 http://www.math-info.univ-paris5.fr/~patte
signature.asc
Description: OpenPGP digital signature