Execute (and not show !) php pages in the subdirectories

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Execute (and not show !) php pages in the subdirectories

Postby rocchr » 30. October 2021 10:40

Apache works normally for the pages in the site directory and the first subdirectories. But the sub-subdirectories doesn't work !
Need help please
rocchr
 
Posts: 23
Joined: 29. October 2021 21:33
XAMPP version: 3.3.0
Operating System: Windows 10

Re: Execute (and not show !) php pages in the subdirectories

Postby rocchr » 30. October 2021 13:57

In fact, i found why...
The php pages don't work.
The html code works, but the balises php are not interpreted : WHY ?
rocchr
 
Posts: 23
Joined: 29. October 2021 21:33
XAMPP version: 3.3.0
Operating System: Windows 10

Re: Execute (and not show !) php pages in the subdirectories

Postby rocchr » 30. October 2021 14:00

I tried :

<php echo "help"; />

<? echo "help"; ?>

But apache doesn't excute the echo "help"...
rocchr
 
Posts: 23
Joined: 29. October 2021 21:33
XAMPP version: 3.3.0
Operating System: Windows 10

Re: Execute (and not show !) php pages in the subdirectories

Postby rocchr » 30. October 2021 14:09

I resolved my problem.

<?php echo "Help"; ?> is the necessary syntax.

Is it possible to change in "<? echo "Help"; ?>" in a ".conf" file ?
rocchr
 
Posts: 23
Joined: 29. October 2021 21:33
XAMPP version: 3.3.0
Operating System: Windows 10

Re: Execute (and not show !) php pages in the subdirectories

Postby rocchr » 30. October 2021 14:12

Yes, i changed in php.ini file "short_open_tag=Off" to "short_open_tag=On"
rocchr
 
Posts: 23
Joined: 29. October 2021 21:33
XAMPP version: 3.3.0
Operating System: Windows 10

Re: Execute (and not show !) php pages in the subdirectories

Postby Altrea » 30. October 2021 17:56

using short open tags is outdated. You should not rely on code that are unnecessary dependend on a php setting.
If you just want to echo something inside of HTML code you can use a short syntax like this:
<?= "Help" ?> which is in fact the short syntax for <?php echo "Help"; ?>
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Execute (and not show !) php pages in the subdirectories

Postby rocchr » 30. October 2021 19:32

Yes, I know, but it is necessary to modify 100.000 lines of code ! In waiting, it is rather necessary to start with xampp !
Than you
rocchr
 
Posts: 23
Joined: 29. October 2021 21:33
XAMPP version: 3.3.0
Operating System: Windows 10

Re: Execute (and not show !) php pages in the subdirectories

Postby Altrea » 30. October 2021 19:35

Use a good plain text editor like notepad++, search in files for "<? " (with the blank at the end) and replace it with "<?php " (again with blank at the end).
Done, 100.000 lines of code changed in seconds.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Execute (and not show !) php pages in the subdirectories

Postby rocchr » 30. October 2021 19:55

Yes, I know but I don't have the spirit for that at this moment with several sites on several pc.
But thank you for your interest !
rocchr
 
Posts: 23
Joined: 29. October 2021 21:33
XAMPP version: 3.3.0
Operating System: Windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 217 guests