
« Zurück zu PHP Portlets
Working with PHP includes
A normal PHP include is as follows:
<?php include '/path/to/file.php'; ?>
I have found it very cumbersome working with portlets in Java with the constant uploading of files upon making a simple change (as little as adding a 5px padding in the CSS). I needed a way to upload a zip file (or portlet) one time and be done.
The way I have found to best accomplish this is as follows:
index.php (view file inside of php portlet)
<?php include '/path/to/php/file/that/is/read/by/Apache'; ?>
So you upload your files to ONE location and that way all you do is point to your main file in your Apache Web Root. Then you can make ALL of your changes in your PHP files and not have to re-upload them through Liferay.
22432 Angesehen