Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Changing some code in index.php

Featured Replies

thanks for unformserver team,

I suggest to change the php code of the index.php in the root of the server to the one attached to this post.

to display the server projects(folders) and server php files.

the changes is to put this code after line 86

   <tr><td colspan="3" style="text-align: center;"><h2>Server Projects</h2></td></tr><?php $n = 0;
foreach (scandir("./") as $file){
if (is_dir($file) && !in_array($file, array(".", "..", "css", "images"))){
	$n++;
	echo ($n % 2 == 0 ? "<td>$n - <a href='" . $file . "' target='_blank'>" . $file . "</a></td></tr>" : "<tr><td>$n - <a href='" . $file . "' target='_blank'>" . $file . "</a></td><td></td>");
}
}
echo ($n == 0 ? "<tr><td style='color: red;' colspan='3'>There is no folders in the server root.</td></tr>" : ($n % 2 == 0 ? "" : "<td></td></tr>"));?>
  <tr><td colspan="3" style="text-align: center;"><h2>Server Php Files</h2></td></tr><?php $n = 0;
foreach (scandir("./") as $file){
if (strtolower(strrchr($file, '.'))==".php" ){
	$n++;
	echo ($n % 2 == 0 ? "<td>$n - <a href='" . $file . "' target='_blank'>" . $file . "</a></td></tr>" : "<tr><td>$n - <a href='" . $file . "' target='_blank'>" . $file . "</a></td><td></td>");
}
}
echo ($n == 0 ? "<tr><td style='color: red;' colspan='3'>There is no Php Files in the server root.</td></tr>" : ($n % 2 == 0 ? "" : "<td></td></tr>"));?>

hope to be good for you.

M.A.S

index.zip

  • 3 months later...

Thanks mas123!

 

This was a good idea. I had seen similar action in another WAMP and had thought of swiping the code.

A modified version of your code is now in 8-Coral www\index.php, and I wanted to give you credit for inspiring it.

 

Regards,

BobS

  • 1 month later...

HI

 

I don't know is this an bug or volitional. If you open the index.php page remotely (not from localhost) the design disappears:

 

post-5539-1326194000_thumb.jpg

It was resolved by copying the CSS and images back to the www folder. Since there were two .htaccess files restricting access, the us_splash copy would disallow access to the css/images, while the www would allow the text.

 

Regards.

BobS

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.