1
I developed a php application and when hosting it, returns me the following problem.
Warning: require_once(service/Qualificacaoservice.php) [Function.require-Once]: failed to open stream: No such file or directory in /var/www/html/caipiraimoveis.com.br/web/Model/Indexmodel.php on line 5
Fatal error: require_once() [Function.require]: Failed Opening required 'service/Qualificacaoservice.php' (include_path='.:/usr/share/Pear') in /var/www/html/caipiraimoveis.com.br/web/Model/Indexmodel.php on line 5
The above directories are in place, on the localhost it works, do you need to do something on the web server? I am using Uol host
<?php
require_once 'viewsmodel/ImovelViewModel.php';
require_once 'viewsmodel/ConsultaResumidaViewModel.php';
require_once 'service/QualificacaoService.php';
require_once 'service/UtilService.php';
require_once 'service/YouTubeService.php';
class IndexModel extends PersistModelAbstract {
No local machine use xammp
– Tiago
put line 5 of the code!!!
– Alan PS
@James Welcome to Stack Overflow! You can [Dit] your question to provide additional information, such as your xammp comment. Read more on [Ask] to improve your question.
– gmsantos
If the host is linux, check the name of the files/folders as it differentiates larger than minute files.
– rray
<?php

require_once 'viewsmodel/ImovelViewModel.php';
require_once 'viewsmodel/ConsultaResumidaViewModel.php';
require_once 'service/QualificacaoService.php';
require_once 'service/UtilService.php';
require_once 'service/YouTubeService.php'; class Indexmodel extends Persistmodelabstract { Line is require_once 'service/Qualificacaoservice.php';
– Tiago
@lost think you got my problem, I’m new in php, and I’m using Windows to program, and Linux to host... ...
– Tiago
Or... instead of refactoring you can use an autoload and never go through this problem!
– Premiere
Tiago, the code here in the comments is hard to read. Please, edit the question to include these details.
– brasofilo
@Premiere I believe he will have the same problem even using autoload.
– gmsantos
@gmsantos By his own comment, the problem is already solved, I just indicated the autoload to improve the code of it avoiding include file by aquivo.
– Premiere