When I try to run my Codeigniter application using "php Sparkserve" I get this message "Cannot open input file: spark"
P粉362071992
P粉362071992 2023-08-31 15:04:47
0
1
564
<p>I am tasked with maintaining an application developed using Codeigniter 3 and php 5 and noticed that I have never used Codeigniter before. </p> <p>When I try to run the server in a local command prompt using the <code>php Sparkserve</code> line, I get the following result: </p> <p><code>Unable to open input file: spark</code></p> <p>BTW, I use Xampp and php 8</p> <p>These are all the folders for the application: </p> <p>Treefolder image of website without Spark files</p> <p>As you can see, there is no file named "spark", which may be why the server is not running as expected. However, I was told that the site was running fine when it went live. </p> <p>I still haven't modified anything in the code because I don't want to mess anything up since I know the app is fully functional when online. </p> <p>What should I do to run it on my computer? </p>
P粉362071992
P粉362071992

reply all(1)
P粉141035089

php Sparkserve Only works with CodeIgniter 4. For CodeIgniter 3, you can use the php -S localhost:8080 command line in the index.php directory (usually the root folder of your project). 8080 is the port, you can replace it with any available port if needed.

You will also need to edit the application/config/config.php file so that $config['base_url']="http://localhost:8080/"code>. But for peace of mind, and to avoid having to edit your environment when changing it (eg: staging, production), it's better to use environment variables (Set environment variables using CodeIgniter 3).

hope it helps you.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!