This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. « 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.
22833 Angesehen