The project was previously written in windows and can be uploaded to windows sever2008. However, I recently planned to use mac for development, but I found that the template cannot be parsed, in php, everything output with print_r is normal, but the html template output with smarty is always displayed as a blank page...
The project was previously written in windows and can be used normally after being uploaded to windows sever 2008. However, I recently planned to use mac for development, but I found that the template cannot be parsed.print_r
Output everything is normal, but usesmarty
Outputhtml
The template is displayed on a blank page, and no error is reported.
This problem has also occurred in the past in windows, but it is because the network fails to upload html files to the server using the FTP tool. This time the html file is good, and it should not be the reason.
Not because it is not enabled.php.ini
Indisplay_errors
Because it is open
Is it becausephp.ini
Why? Is there any setting related to this?
This permission is readable and writable, and both folders and files are. But I found that mac has the permission on files, not only for login users, but also for different applications? Will the permission to read php or Apache be disabled?
Reply content:
The project was previously written in windows and can be used normally after being uploaded to windows sever 2008. However, I recently planned to use mac for development, but I found that the template cannot be parsed.print_r
Output everything is normal, but usesmarty
Outputhtml
The template is displayed on a blank page, and no error is reported.
This problem has also occurred in the past in windows, but it is because the network fails to upload html files to the server using the FTP tool. This time the html file is good, and it should not be the reason.
Not because it is not enabled.php.ini
Indisplay_errors
Because it is open
Is it becausephp.ini
Why? Is there any setting related to this?
This permission is readable and writable, and both folders and files are. But I found that mac has the permission on files, not only for login users, but also for different applications? Will the permission to read php or Apache be disabled?
Chmod 777/Library/WebServer/Documents
It is indeed a permission issue. It is estimated that smarty has no permission to write files, so it failed, but did not report an error.
The above is the terminal command, followed by the project directory, just change it to your own.
This has nothing to do with php. ini settings. smarty is a php third-party package. Check the import path carefully.
Note Permissionschrow -R 755 /tmp